diff --git a/hosts/challenger/backup.nix b/hosts/challenger/backup.nix index 5690f7d..ce532ea 100644 --- a/hosts/challenger/backup.nix +++ b/hosts/challenger/backup.nix @@ -13,6 +13,18 @@ "--keep-yearly 10" ]; }; + cloudJob = name: paths: { + inherit paths; + # "rsyncnet" connection details specified in /root/.ssh/config + repository = "sftp://rsyncnet/restic/challenger/${name}"; + passwordFile = config.sops.secrets."restic/${name}".path; + initialize = true; + pruneOpts = [ + # rsync.net keeps daily snapshots + "--keep-weekly 4" + "--keep-monthly 36" + ]; + }; in { postgres = (localJob "postgres" [ "/var/backup/postgres" ]) // { timerConfig.OnCalendar = "05:15"; # 2h after postgresqlBackup @@ -32,6 +44,7 @@ # Nextcloud data nextcloud = localJob "nextcloud" [ "/tank/nextcloud" ]; + nextcloud-remote = cloudJob "nextcloud" [ "/tank/nextcloud" ]; # TODO: timemachine, komga };