From 3c69628f1f86f21b82ae0052a0e80227b8bd04eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=ADas=20Garc=C3=ADa=20Isa=C3=ADa?= Date: Mon, 30 Jun 2025 20:15:09 -0300 Subject: [PATCH 1/2] postgres-backup-s3: honor extra opts in pg_dumpall The setting was being used in `psql`, but not when POSTGRES_BACKUP_ALL is set. --- postgres-backup-s3/backup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres-backup-s3/backup.sh b/postgres-backup-s3/backup.sh index 4ae6cff..b3f113f 100644 --- a/postgres-backup-s3/backup.sh +++ b/postgres-backup-s3/backup.sh @@ -71,7 +71,7 @@ if [ "${POSTGRES_BACKUP_ALL}" == "true" ]; then fi echo "Creating dump of all databases from ${POSTGRES_HOST}..." - pg_dumpall -h $POSTGRES_HOST -p $POSTGRES_PORT -U $POSTGRES_USER | gzip > $SRC_FILE + pg_dumpall $POSTGRES_HOST_OPTS | gzip > $SRC_FILE if [ "${ENCRYPTION_PASSWORD}" != "**None**" ]; then echo "Encrypting ${SRC_FILE}" From a4139987318cf3eaa04df0661fa2252fdcbe09ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=ADas=20Garc=C3=ADa=20Isa=C3=ADa?= Date: Thu, 24 Jul 2025 01:33:56 -0300 Subject: [PATCH 2/2] Fix: postgres-backup-s3 crontab syntax It was yielding an error "user lookup failed: user: unknown user /bin/sh" --- postgres-backup-s3/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres-backup-s3/run.sh b/postgres-backup-s3/run.sh index ef80106..535d553 100644 --- a/postgres-backup-s3/run.sh +++ b/postgres-backup-s3/run.sh @@ -9,6 +9,6 @@ fi if [ "${SCHEDULE}" = "**None**" ]; then sh backup.sh else - echo -e "SHELL=/bin/sh\n${SCHEDULE} /bin/sh /backup.sh" > /etc/crontabs/root + echo -e "SHELL=/bin/sh\n${SCHEDULE} root /bin/sh /backup.sh" > /etc/crontabs/root exec go-crond /etc/crontabs/root fi