hainich: init restic backups
This commit is contained in:
parent
e42376687f
commit
233a4c7cab
3 changed files with 33 additions and 0 deletions
|
@ -93,6 +93,28 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.kernelPackages = pkgs.linuxPackages;
|
boot.kernelPackages = pkgs.linuxPackages;
|
||||||
|
|
||||||
|
services.restic.backups.tardis = {
|
||||||
|
passwordFile = "/etc/restic/system";
|
||||||
|
s3CredentialsFile = "/etc/restic/system.s3creds";
|
||||||
|
paths = [
|
||||||
|
"/data"
|
||||||
|
"/home"
|
||||||
|
"/run/florinori"
|
||||||
|
"/var/lib/containers/codimd/var/lib/codimd"
|
||||||
|
"/var/lib/containers/codimd/var/backup/postgresql"
|
||||||
|
"/var/lib/containers/lantifa/var/lib/mediawiki"
|
||||||
|
"/var/lib/containers/lantifa/var/backup/mysql"
|
||||||
|
"/var/lib/syncthing"
|
||||||
|
];
|
||||||
|
pruneOpts = [
|
||||||
|
"--keep-daily 7"
|
||||||
|
"--keep-weekly 5"
|
||||||
|
"--keep-monthly 12"
|
||||||
|
];
|
||||||
|
repository = "b2:tardis-hainich:system";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
|
|
|
@ -55,6 +55,11 @@
|
||||||
};
|
};
|
||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
|
services.postgresqlBackup = {
|
||||||
|
enable = true;
|
||||||
|
databases = [ "codimd" ];
|
||||||
|
startAt = "*-*-* 23:45:00";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -80,6 +80,12 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.mysqlBackup = {
|
||||||
|
enable = true;
|
||||||
|
databases = [ "mediawiki" ];
|
||||||
|
calendar = "*-*-* 23:45:00";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue