automatic prune of backups

This commit is contained in:
Cyryl Płotnicki 2023-12-23 16:47:23 +00:00
parent 31b448d615
commit c4fd894489
2 changed files with 21 additions and 0 deletions

View file

@ -22,6 +22,13 @@ in {
repository = "rest:http://bolty:8000/";
timerConfig = {OnCalendar = "hourly";};
extraBackupArgs = extraArgs;
pruneOpts = [
"--keep-hourly 25"
"--keep-daily 8"
"--keep-weekly 5"
"--keep-monthly 13"
"--keep-yearly 2"
];
};
restic.backups.home-to-b2 = {
@ -31,6 +38,13 @@ in {
timerConfig = {OnCalendar = "hourly";};
extraBackupArgs = extraArgs;
environmentFile = "/etc/nixos/secrets/b2-env";
pruneOpts = [
"--keep-hourly 25"
"--keep-daily 8"
"--keep-weekly 5"
"--keep-monthly 13"
"--keep-yearly 2"
];
};
};

View file

@ -37,6 +37,13 @@ in rec {
extraBackupArgs = [
"--exclude='cache'"
];
pruneOpts = [
"--keep-hourly 25"
"--keep-daily 8"
"--keep-weekly 5"
"--keep-monthly 13"
"--keep-yearly 2"
];
};
};