postgres: create daily backups
This commit is contained in:
parent
91eaa2f008
commit
8b037b16a4
|
@ -76,6 +76,7 @@
|
|||
repo = (lib.removeSuffix "\n" (builtins.readFile ./borg-backup-repo));
|
||||
paths = [
|
||||
"/var/lib/matrix-synapse"
|
||||
"/var/backup/postgresql"
|
||||
];
|
||||
exclude = [];
|
||||
};
|
||||
|
|
|
@ -28,6 +28,13 @@ in {
|
|||
package = pkgs.postgresql_12;
|
||||
};
|
||||
|
||||
services.postgresqlBackup = {
|
||||
enable = true;
|
||||
databases = [ "matrix-synapse" ];
|
||||
# Borg backup starts at midnight so create DB dump just before
|
||||
startAt = "*-*-* 23:30:00";
|
||||
};
|
||||
|
||||
services.matrix-synapse = {
|
||||
enable = true;
|
||||
server_name = domain;
|
||||
|
|
Loading…
Reference in a new issue