restic-prune

This commit is contained in:
Charlotte 🦝 Delenk 2022-09-12 11:38:55 +01:00
parent af70917ae8
commit 58b68ff8fa
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122

View file

@ -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;
}; };
}; };
} }