From d6ff00c928b293c0aadde6dcd7713bb1b7c7673f Mon Sep 17 00:00:00 2001 From: Zaariel91 <115039613+Zaariel91@users.noreply.github.com> Date: Tue, 10 Dec 2024 21:52:18 +0300 Subject: [PATCH] Update backup.sh --- backup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backup.sh b/backup.sh index 0b180c7..2cbdbde 100644 --- a/backup.sh +++ b/backup.sh @@ -13,7 +13,7 @@ fi # env vars needed for pg_dump export PGPASSWORD=$POSTGRES_PASSWORD -POSTGRES_HOST_OPTS="-h $POSTGRES_HOST -p $POSTGRES_PORT -U $POSTGRES_USER $POSTGRES_EXTRA_OPTS" +#POSTGRES_HOST_OPTS="-h $POSTGRES_HOST -p $POSTGRES_PORT -U $POSTGRES_USER $POSTGRES_EXTRA_OPTS" case "${PG_BACKUP_ACTION:-dump}" in dump) @@ -55,7 +55,7 @@ case "${PG_BACKUP_ACTION:-dump}" in # TODO: check if database is fresh echo "Snapshotting $POSTGRES_DB database" - pg_dump -Fc $POSTGRES_HOST_OPTS $POSTGRES_DB -f dump.backup + pg_dump -U $POSTGRES_USER -h $POSTGRES_HOST -p $POSTGRES_PORT -d $POSTGRES_DB -Fc -f dump.backup aws configure set default.s3.multipart_chunksize 16MB if [ "${PRIVATE_BACKUP}" == "true" ] || [ "${PRIVATE_BACKUP}" == "1" ]; then