nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

nixos/postgresql-backup: add pgdumpAllOptions (#438371)

authored by

Wolfgang Walther and committed by
GitHub
18d75dd0 bff469e4

+15 -2
+14 -2
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 or pg_dumpall. 127 + Command line options for pg_dump. This options is not used if 128 + `config.services.postgresqlBackup.backupAll` is enabled. Note that 129 + config.services.postgresqlBackup.backupAll is also active, when no 130 + databases where specified. 131 + ''; 132 + }; 133 + 134 + pgdumpAllOptions = lib.mkOption { 135 + type = lib.types.separatedString " "; 136 + default = ""; 137 + description = '' 138 + Command line options for pg_dumpall. This options is not used if 139 + `config.services.postgresqlBackup.backupAll` is disabled. 128 140 ''; 129 141 }; 130 142 ··· 187 175 } 188 176 189 177 (lib.mkIf cfg.backupAll { 190 - systemd.services.postgresqlBackup = postgresqlBackupService "all" "pg_dumpall ${cfg.pgdumpOptions}"; 178 + systemd.services.postgresqlBackup = postgresqlBackupService "all" "pg_dumpall ${cfg.pgdumpAllOptions}"; 191 179 }) 192 180 193 181 (lib.mkIf (!cfg.backupAll) {
+1
nixos/tests/postgresql/postgresql.nix
··· 66 66 enable = true; 67 67 databases = lib.optional (!backupAll) "postgres"; 68 68 pgdumpOptions = "--restrict-key=ABCDEFGHIJKLMNOPQRSTUVWXYZ"; 69 + pgdumpAllOptions = "--restrict-key=ABCDEFGHIJKLMNOPQRSTUVWXYZ"; 69 70 }; 70 71 }; 71 72