diff options
author | sefidel <contact@sefidel.net> | 2023-08-02 10:07:19 +0900 |
---|---|---|
committer | sefidel <contact@sefidel.net> | 2023-08-02 10:32:59 +0900 |
commit | 718a92694e822106c66bba8a106f042e1ffa6afe (patch) | |
tree | 36c15013eb59cd2f674ca26dc364463641d50e09 /modules/services | |
parent | 1366799fa7c35bdce89a0fa5ce662fd8fdefbe7e (diff) | |
download | infra-718a92694e822106c66bba8a106f042e1ffa6afe.tar.gz infra-718a92694e822106c66bba8a106f042e1ffa6afe.zip |
feat(services/backup): setup auto prune
Diffstat (limited to 'modules/services')
-rw-r--r-- | modules/services/backup.nix | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/services/backup.nix b/modules/services/backup.nix index a513d18..41d2329 100644 --- a/modules/services/backup.nix +++ b/modules/services/backup.nix @@ -59,6 +59,12 @@ in services.borgbackup.jobs.${cfg.name} = { inherit (cfg) paths exclude repo; + prune.keep = { + within = "1d"; # Keep all archives from the last day + daily = 7; + weekly = 4; + monthly = 3; + }; encryption.mode = "repokey-blake2"; encryption.passCommand = "cat ${cfg.repoKeyPath}"; |