Skip to content

Commit 05e4c26

Browse files
committed
fix: use variable for backup script postgres user
1 parent d9e11d1 commit 05e4c26

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

controllers/spec/template/yaml/BaseConfigMapTemplate.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ data:
122122
echo "$dt - Starting DB backup of Kubegres resource $KUBEGRES_RESOURCE_NAME into file: $backUpFilePath";
123123
echo "$dt - Running: pg_dumpall -h $BACKUP_SOURCE_DB_HOST_NAME -U postgres -c | gzip > $backUpFilePath"
124124
125-
pg_dumpall -h $BACKUP_SOURCE_DB_HOST_NAME -U postgres -c | gzip > $backUpFilePath
125+
pg_dumpall -h $BACKUP_SOURCE_DB_HOST_NAME -U $POSTGRES_USER -c | gzip > $backUpFilePath
126126
127127
if [ $? -ne 0 ]; then
128128
rm $backUpFilePath

controllers/spec/template/yaml/Templates.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ data:
189189
echo "$dt - Starting DB backup of Kubegres resource $KUBEGRES_RESOURCE_NAME into file: $backUpFilePath";
190190
echo "$dt - Running: pg_dumpall -h $BACKUP_SOURCE_DB_HOST_NAME -U postgres -c | gzip > $backUpFilePath"
191191
192-
pg_dumpall -h $BACKUP_SOURCE_DB_HOST_NAME -U postgres -c | gzip > $backUpFilePath
192+
pg_dumpall -h $BACKUP_SOURCE_DB_HOST_NAME -U $POSTGRES_USER -c | gzip > $backUpFilePath
193193
194194
if [ $? -ne 0 ]; then
195195
rm $backUpFilePath

0 commit comments

Comments
 (0)