snapshot
This commit is contained in:
parent
47036cde64
commit
0968b6f955
57 changed files with 426 additions and 86 deletions
24
hosts/server/abacus/backup.nix
Normal file
24
hosts/server/abacus/backup.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
attrName,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
age.secrets = lib.mkSecrets {"restic-${attrName}" = {};};
|
||||
|
||||
services.restic.backups.${attrName} = {
|
||||
repository = "sftp:u385962@u385962.your-storagebox.de:/restic/${attrName}";
|
||||
initialize = true;
|
||||
paths = [
|
||||
config.services.vaultwarden.backupDir
|
||||
config.services.syncthing.dataDir
|
||||
];
|
||||
passwordFile = config.age.secrets."restic-${attrName}".path;
|
||||
pruneOpts = ["--keep-daily 7" "--keep-weekly 5" "--keep-monthly 12"];
|
||||
timerConfig = {
|
||||
OnCalendar = "*-*-* 03:00:00";
|
||||
Persistent = true;
|
||||
};
|
||||
extraOptions = ["sftp.args='-i /etc/ssh/ssh_host_ed25519_key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'"];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue