From f5c190541aaf5f67d1d485dcb7adc58dcfcd2375 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 19:46:49 -0300 Subject: [PATCH 1/3] Upgrade postgres-backup-s3 to psql 17 The upstream `go-crond` repo now uses `main` as it's base branch, so the tag name changed. --- postgres-backup-s3/Dockerfile | 2 +- postgres-backup-s3/install.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/postgres-backup-s3/Dockerfile b/postgres-backup-s3/Dockerfile index 747f90c..4cb8060 100644 --- a/postgres-backup-s3/Dockerfile +++ b/postgres-backup-s3/Dockerfile @@ -1,4 +1,4 @@ -FROM webdevops/go-crond:master-alpine +FROM webdevops/go-crond:main-alpine LABEL maintainer="Johannes Schickling " ADD install.sh install.sh diff --git a/postgres-backup-s3/install.sh b/postgres-backup-s3/install.sh index 633294e..987568c 100644 --- a/postgres-backup-s3/install.sh +++ b/postgres-backup-s3/install.sh @@ -5,7 +5,7 @@ set -eo pipefail apk update apk add openssl aws-cli -apk add postgresql-client --repository=https://dl-cdn.alpinelinux.org/alpine/v3.19/main +apk add postgresql-client # cleanup rm -rf /var/cache/apk/* From f3c27906eebfefc387bc239a9aa5ea97cd737954 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 2/3] 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 2be86208e1012f2497e5ebb5da931f4f1c2a9934 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 3/3] 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