nixos-config/hosts/next/backup.nix

21 lines
500 B
Nix
Raw Normal View History

2022-07-06 20:46:17 +00:00
{config, pkgs, ...}:
{
services.restic.backups = {
localbackup = {
initialize = true;
passwordFile = "/run/restic_pass";
2022-07-08 08:07:53 +00:00
paths = [ "/var/lib/nextcloud/data/" "/var/backup/postgresql" ];
2022-07-06 20:46:17 +00:00
repository = "rest:https://back.atlanticaweb.fr/Nextcloud";
timerConfig = {
2022-07-08 08:07:53 +00:00
OnCalendar = "02:05";
2022-07-06 20:46:17 +00:00
RandomizedDelaySec = "5h";
};
};
};
2022-07-08 08:07:53 +00:00
services.postgresqlBackup = {
enable = true;
backupAll = true;
# location = "/var/lib/nextcloud/data/backup";
};
2022-07-06 20:46:17 +00:00
}