Use restic for backups

Now that I have a working Restic backup server, use that for backups
rather than rsyncing to Synology
This commit is contained in:
Greg Hellings
2025-10-15 00:02:48 -05:00
parent 16e98c44b8
commit 3f587cdf8e
5 changed files with 76 additions and 43 deletions
+20 -1
View File
@@ -1,4 +1,9 @@
{ config, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
{
age.secrets.nextcloudadmin.file = ../../secrets/nextcloudadmin.age;
@@ -33,5 +38,19 @@
greg.backup.jobs.nextcloud-bkup = {
src = "/var/lib/nextcloud";
dest = "nextcloud-backup";
pre = lib.getExe (
pkgs.writeShellApplication {
name = "nextcloud-backup-pre";
runtimeInputs = [ config.services.nextcloud.occ ];
text = "nextcloud-occ maintenance:mode --on";
}
);
post = lib.getExe (
pkgs.writeShellApplication {
name = "nextcloud-backup-post";
runtimeInputs = [ config.services.nextcloud.occ ];
text = "nextcloud-occ maintenance:mode --off";
}
);
};
}