ensure postgres backups exist

This commit is contained in:
2025-10-18 18:18:03 -05:00
parent c8e7d0ac7f
commit 39336740e1
2 changed files with 4 additions and 2 deletions

View File

@@ -54,7 +54,7 @@ in {
databases = config.services.mysql.ensureDatabases; # set to all databases defined in esure databases
};
# postgresql backups currently immich is the only user
services.postgresqlBackup = lib.mkIf config.services.postgresql.enable {
services.postgresqlBackup = lib.mkIf (config.services.postgresql.ensureDatabases != []) {
enable = true;
location = "/var/backup/postgresql";
compression = "zstd"; # optional: "xz", "zstd", "none"