backups: psql dumps for mattermost & nextcloud

This commit is contained in:
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 host mattermost mattermost ::1/128 trust
''; '';
}; };
services.postgresqlBackup = {
enable = true;
databases = [ "mattermost" ];
startAt = "*-*-* 23:45:00";
location = "/persist/backups/postgres";
};
networking.firewall.allowedTCPPorts = [ 3000 ]; 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 # ensure that postgres is running *before* running the setup
systemd.services."nextcloud-setup" = { systemd.services."nextcloud-setup" = {
requires = ["postgresql.service"]; requires = ["postgresql.service"];