challenger/backup: Add remote cloud backups
This commit is contained in:
parent
dc5b6f9915
commit
ac1e8d2f3f
@ -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
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user