From 4ffc9224198882c3794181cfd0e7a3d6a713bd5b Mon Sep 17 00:00:00 2001 From: Andrea Ciceri Date: Thu, 17 Oct 2024 23:21:58 +0200 Subject: [PATCH] Backup also the postgres db and paperless --- modules/restic/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/restic/default.nix b/modules/restic/default.nix index 3edb52d..c3ba948 100644 --- a/modules/restic/default.nix +++ b/modules/restic/default.nix @@ -25,10 +25,21 @@ in host }".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIICf9svRenC/PLKIL9nk6K/pxQgoiFC41wTNvoIncOxs"; + services.postgresqlBackup = { + enable = true; + backupAll = true; + location = "/var/backup/postgresql"; + }; + + environment.persistence."/persist".directories = [ + config.services.postgresqlBackup.location + ]; + services.restic.backups.sisko = { paths = [ "/persist" "/mnt/hd/immich" + "/mnt/hd/paperless" ]; exclude = [ " /persist/var/lib/containers" ]; passwordFile = config.age.secrets.SISKO_RESTIC_PASSWORD.path;