Install restic on sisko

This commit is contained in:
Andrea Ciceri 2024-10-10 17:06:33 +02:00
parent 180e5743cc
commit eb09394470
Signed by: aciceri
SSH key fingerprint: SHA256:/AagBweyV4Hlfg9u092n8hbHwD5fcB6A3qhDiDA65Rg
2 changed files with 105 additions and 17 deletions

View file

@ -26,13 +26,22 @@ in
}".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIICf9svRenC/PLKIL9nk6K/pxQgoiFC41wTNvoIncOxs";
services.restic.backups.sisko = {
paths = [ "/persist" ];
paths = [
"/persist"
"/mnt/hd/immich"
];
exclude = [ " /persist/var/lib/containers" ];
passwordFile = config.age.secrets.SISKO_RESTIC_PASSWORD.path;
extraOptions = [
"sftp.command='${lib.getExe pkgs.sshpass} -f ${config.age.secrets.HETZNER_STORAGE_BOX_SISKO_SSH_PASSWORD.path} ssh -p${port} ${user}@${host} -s sftp'"
];
repository = "sftp://${user}@${host}:${port}/";
initialize = true;
pruneOpts = [
"--keep-yearly 1"
"--keep-monthly 2"
"--keep-daily 7"
];
timerConfig.OnCalendar = "daily";
timerConfig.RandomizedDelaySec = "1h";
};