add backups to cassie's b2

This commit is contained in:
ChaotiCryptidz 2021-12-31 12:40:11 +00:00
parent 296031f35b
commit e37126b016

View file

@ -1,13 +1,28 @@
{ ... }: {
services.restic.backups.hetzner-vm = {
user = "root";
paths = [ "/var/lib/postgresql" "/var/lib/vault" ];
timerConfig = {
{ ... }:
let
backupUser = "root";
backupPaths = [
"/var/lib/postgresql" "/var/lib/vault"
];
timerConfig = {
OnBootSec = "1m";
OnCalendar = "daily";
};
in {
services.restic.backups.hetzner-vm = {
user = backupUser;
paths = backupPaths;
timerConfig = timerConfig;
repository = "b2:Backups-HetznerVM:/";
passwordFile = "/secrets/restic-password";
environmentFile = "/secrets/restic-env";
};
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";
};
}