backups: psql dumps for mattermost & nextcloud

removing-nix-hexchen
stuebinm 2024-01-28 15:48:13 +01:00
parent 816e175b33
commit 93cc8b8172
2 changed files with 13 additions and 0 deletions

View File

@ -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 ];

View File

@ -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"];