From 7d4a3acb94fe770cbd46ae7be13e861cec0b446a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Sun, 15 Jan 2023 20:05:56 +0200 Subject: [PATCH] auto-prune backups --- configuration.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configuration.nix b/configuration.nix index e193f66..8abefa2 100644 --- a/configuration.nix +++ b/configuration.nix @@ -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 || :