postgresql.tests.postgresql.postgresql-backup-all: fix random dump (#433969)

authored by Wolfgang Walther and committed by GitHub 07dec819 701f74fe

+3 -5
+2 -5
nixos/modules/services/backup/postgresql-backup.nix
··· 124 124 type = lib.types.separatedString " "; 125 125 default = "-C"; 126 126 description = '' 127 - Command line options for pg_dump. This options is not used 128 - if `config.services.postgresqlBackup.backupAll` is enabled. 129 - Note that config.services.postgresqlBackup.backupAll is also active, 130 - when no databases where specified. 127 + Command line options for pg_dump or pg_dumpall. 131 128 ''; 132 129 }; 133 130 ··· 177 174 ]; 178 175 }) 179 176 (lib.mkIf (cfg.enable && cfg.backupAll) { 180 - systemd.services.postgresqlBackup = postgresqlBackupService "all" "pg_dumpall"; 177 + systemd.services.postgresqlBackup = postgresqlBackupService "all" "pg_dumpall ${cfg.pgdumpOptions}"; 181 178 }) 182 179 (lib.mkIf (cfg.enable && !cfg.backupAll) { 183 180 systemd.services = lib.listToAttrs (
+1
nixos/tests/postgresql/postgresql.nix
··· 65 65 services.postgresqlBackup = { 66 66 enable = true; 67 67 databases = lib.optional (!backupAll) "postgres"; 68 + pgdumpOptions = "--restrict-key=ABCDEFGHIJKLMNOPQRSTUVWXYZ"; 68 69 }; 69 70 }; 70 71