nixos-config/hosts/next/backup.nix

25 lines
617 B
Nix
Raw Permalink Normal View History

2022-07-06 20:46:17 +00:00
{config, pkgs, ...}:
{
environment.systemPackages = with pkgs; [
restic
];
2022-07-06 20:46:17 +00:00
services.restic.backups = {
remotebackup = {
initialize = true;
passwordFile = "/run/restic_pass";
paths = [ "/var/lib/nextcloud/data/" "/var/backup/postgresql" ];
#repository = "rest:https://back.atlanticaweb.fr/Nextcloud";
repository = "sftp:u329746@u329746.your-storagebox.de:/home/Nextcloud";
timerConfig = {
OnCalendar = "02:05";
RandomizedDelaySec = "5h";
2022-07-06 20:46:17 +00:00
};
};
2022-07-06 20:46:17 +00:00
};
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
}