From 508477f076b23a7d332e91f899b61e035b473b54 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Mon, 18 Jun 2018 23:58:30 +0200 Subject: [PATCH] nixos-18.03/pgbackup: Fix bug in postgresql-backup module that causes pg_dump to fail Run pg_dump as postgres super user instead of root. See https://github.com/NixOS/nixpkgs/issues/41388 --- nixos/modules/services/backup/postgresql-backup.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/backup/postgresql-backup.nix b/nixos/modules/services/backup/postgresql-backup.nix index 4a5ebebc682e1..978eeccd3573b 100644 --- a/nixos/modules/services/backup/postgresql-backup.nix +++ b/nixos/modules/services/backup/postgresql-backup.nix @@ -9,7 +9,7 @@ let postgresqlBackupCron = db: '' - ${config.services.postgresqlBackup.period} root ${config.services.postgresql.package}/bin/pg_dump ${db} | ${gzip}/bin/gzip -c > ${location}/${db}.gz + ${config.services.postgresqlBackup.period} root ${config.services.postgresql.package}/bin/pg_dump ${db} -U postgres | ${gzip}/bin/gzip -c > ${location}/${db}.gz ''; in