Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647{ config, lib, ... }:
{ options = { myService.backup.enable = lib.mkEnableOption "enable Backup Service"; };
config = lib.mkIf config.myService.backup.enable { sops.secrets = { restic_password = { }; };
services.postgresqlBackup = { enable = true; startAt = "01:30:00"; # (30 mins before Restic) location = "/var/backup/postgresql"; };
services.restic.backups = { vps-remote = { initialize = true; passwordFile = config.sops.secrets."restic_password".path; repository = "sftp:backupuser@ssh.tobinio.dev:/home/backupuser/homeserver-backups";
paths = [ "/srv" "/var/backup/postgresql" ];
extraBackupArgs = [ "--exclude='/srv/postgresql'" "--exclude='/srv/nextcloud/data'" ];
timerConfig = { OnCalendar = "02:00:00"; Persistent = true; };
pruneOpts = [ "--keep-daily 7" ]; }; }; };}