nixfiles/hosts/hetzner-vm/services/restic.nix

27 lines
721 B
Nix
Raw Normal View History

2021-12-31 12:40:11 +00:00
{ ... }:
2021-12-31 12:53:52 +00:00
let
2021-12-31 12:40:11 +00:00
backupUser = "root";
2021-12-31 12:53:52 +00:00
backupPaths = [ "/var/lib/postgresql" "/var/lib/vault" ];
timerConfig = {
OnBootSec = "1m";
OnCalendar = "daily";
};
2021-12-31 12:40:11 +00:00
in {
services.restic.backups.hetzner-vm = {
user = backupUser;
paths = backupPaths;
timerConfig = timerConfig;
2021-12-29 18:33:04 +00:00
repository = "b2:Backups-HetznerVM:/";
2021-12-29 13:17:01 +00:00
passwordFile = "/secrets/restic-password";
environmentFile = "/secrets/restic-env";
};
2021-12-31 12:40:11 +00:00
services.restic.backups.cassie-hetzner-vm = {
user = backupUser;
paths = backupPaths;
timerConfig = timerConfig;
repository = "b2:Cryptidz-Backup:HetznerVM";
passwordFile = "/secrets/restic-password-cassie";
environmentFile = "/secrets/restic-env-cassie";
};
2021-12-29 13:17:01 +00:00
}