added backup pruning to restic.
Only done on the restic host itself, as no remote can do it due to --append-only.
This commit is contained in:
parent
838f85f25d
commit
e46677a3f6
1 changed files with 9 additions and 2 deletions
|
@ -42,14 +42,21 @@ in {
|
|||
];
|
||||
|
||||
services.restic.backups = lib.mkIf (inputs ? nix-secrets) {
|
||||
remote = {
|
||||
repositoryFile = config.sops.secrets.restic-url.path;
|
||||
local = {
|
||||
repositoryFile = "/backup/restic/";
|
||||
passwordFile = config.sops.secrets.restic-password.path;
|
||||
initialize = true;
|
||||
paths = [
|
||||
"/storage/syncthing"
|
||||
"/storage/factorio"
|
||||
];
|
||||
pruneOpts=[
|
||||
"--keep-within 14d"
|
||||
"--keep-daily 14"
|
||||
"--keep-weekly 8"
|
||||
"--keep-monthly 12"
|
||||
"--keep-yearly 10"
|
||||
];
|
||||
timerConfig = {
|
||||
OnCalendar = "daily";
|
||||
Persistent = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue