From 93cc8b81727dc3bf088a31083daae378251ea1da Mon Sep 17 00:00:00 2001 From: stuebinm Date: Sun, 28 Jan 2024 15:48:13 +0100 Subject: [PATCH] backups: psql dumps for mattermost & nextcloud --- parsons/mattermost.nix | 6 ++++++ parsons/nextcloud.nix | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/parsons/mattermost.nix b/parsons/mattermost.nix index 17b22d9..bf3354f 100644 --- a/parsons/mattermost.nix +++ b/parsons/mattermost.nix @@ -211,6 +211,12 @@ host mattermost mattermost ::1/128 trust ''; }; + services.postgresqlBackup = { + enable = true; + databases = [ "mattermost" ]; + startAt = "*-*-* 23:45:00"; + location = "/persist/backups/postgres"; + }; networking.firewall.allowedTCPPorts = [ 3000 ]; diff --git a/parsons/nextcloud.nix b/parsons/nextcloud.nix index d552bd4..1130ea7 100644 --- a/parsons/nextcloud.nix +++ b/parsons/nextcloud.nix @@ -69,6 +69,13 @@ ]; }; + services.postgresqlBackup = { + enable = true; + databases = [ "nextcloud" ]; + startAt = "*-*-* 23:45:00"; + location = "/persist/backups/postgres"; + }; + # ensure that postgres is running *before* running the setup systemd.services."nextcloud-setup" = { requires = ["postgresql.service"];