New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add minAge setting to nixos borgbackup options #85696
base: master
Are you sure you want to change the base?
Conversation
6ec1592
to
8a5c4a5
Compare
also here (as in #85697), please use a different commit message to add yourself to the maintainers :) |
8a5c4a5
to
9fa1d88
Compare
Done. |
@@ -42,6 +42,24 @@ let | |||
${cfg.postInit} | |||
fi | |||
'' + '' | |||
# Check if the backup is old enough. | |||
now=$(date +%s) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we could add the check only if minAge != 0?
I marked this as stale due to inactivity. → More info |
Motivation for this change
Not all the systems I back up are online all the time, so I like to run multiple backups per day in the hopes of catching them when they're online, but not bother backing them up if there's already a recent backup. This change adds a
minAge
setting to borgbackup configuration; the backups will be checked with the configured frequency, but skip actually performing the backup if there's one for the same prefix more recent thanminAge
.I've been using this feature on my server for about a year now.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)