auto-prune backups

compress-drv-tests
Motiejus Jakštys 2023-01-15 20:05:56 +02:00
parent e3d1d34f5b
commit 7d4a3acb94
1 changed files with 4 additions and 0 deletions

View File

@ -121,6 +121,10 @@ let ssh_pubkeys = {
repository = "sftp:zh2769@zh2769.rsync.net:hel1-a.servers.jakst";
initialize = true;
passwordFile = "/var/src/secrets/restic/password";
pruneOpts = [
"--keep-daily 7"
"--keep-weekly 5"
];
backupPrepareCommand = ''
set -euo pipefail
${pkgs.util-linux}/bin/umount /var/lib/.snapshot-latest || :