add genepi home backups to storagebox

This commit is contained in:
2025-02-07 00:59:57 +01:00
parent 11c5bc3ff5
commit 3af7b79f83

View File

@@ -8,6 +8,7 @@ let
storagebox-user = "u422292-sub1";
storagebox-host = "${storagebox-user}.your-storagebox.de";
storagebox-nightly-backup-name = "storagebox-nightly";
storagebox-weekly-home-backup-name = "storagebox-weekly-home";
in
{
environment.systemPackages = [
@@ -69,4 +70,26 @@ in
];
serviceConfig.privateMounts = true;
};
# Backup home
services.restic.backups."${storagebox-weekly-home-backup-name}" = {
initialize = true;
paths = [
"/home/rpqt"
];
passwordFile = config.age.secrets.restic-genepi-storagebox-key.path;
repository = "sftp://${storagebox-user}@${storagebox-host}/";
extraOptions = [
"sftp.command='${pkgs.sshpass}/bin/sshpass -f ${config.age.secrets.restic-genepi-storagebox-password.path} -- ssh ${storagebox-host} -l ${storagebox-user} -s sftp'"
];
timerConfig = {
OnCalendar = "Sat 03:30";
RandomizedDelaySec = "1h";
};
pruneOpts = [
"--keep-weekly 1"
"--keep-monthly 12"
"--keep-yearly 10"
];
};
}