restic-prune
This commit is contained in:
parent
af70917ae8
commit
58b68ff8fa
1 changed files with 13 additions and 2 deletions
|
@ -96,6 +96,17 @@ in {
|
||||||
EnvironmentFile = config.sops.secrets."services/restic/env".path;
|
EnvironmentFile = config.sops.secrets."services/restic/env".path;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
systemd.timers.restic-prune = {
|
||||||
|
enable = true;
|
||||||
|
description = "Prune restic backups";
|
||||||
|
requires = ["restic-prune.service"];
|
||||||
|
wantedBy = ["multi-user.target"];
|
||||||
|
timerConfig = {
|
||||||
|
OnCalendar = "weekly";
|
||||||
|
RandomizedDelaySec = 604800;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
sops.secrets."services/restic/env".owner = "backup";
|
sops.secrets."services/restic/env".owner = "backup";
|
||||||
sops.secrets."services/restic/rclone.conf" = {
|
sops.secrets."services/restic/rclone.conf" = {
|
||||||
owner = "backup";
|
owner = "backup";
|
||||||
|
@ -119,8 +130,8 @@ in {
|
||||||
requires = ["backup-rclone.service"];
|
requires = ["backup-rclone.service"];
|
||||||
wantedBy = ["multi-user.target"];
|
wantedBy = ["multi-user.target"];
|
||||||
timerConfig = {
|
timerConfig = {
|
||||||
OnBootSec = 300;
|
OnCalendar = "weekly";
|
||||||
OnUnitActiveSec = 86400;
|
RandomizedDelaySec = 604800;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue