From e31758592c016f1d8084c6bd237520a2bdd54a03 Mon Sep 17 00:00:00 2001 From: Anik Ghosh <52236930+anikghosh256@users.noreply.github.com> Date: Mon, 27 Jan 2025 20:49:55 +0600 Subject: [PATCH 1/2] chore(postgres-backup-s3): update postgresql-client version (#166) --- postgres-backup-s3/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres-backup-s3/install.sh b/postgres-backup-s3/install.sh index 5e63e1a..633294e 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.18/main +apk add postgresql-client --repository=https://dl-cdn.alpinelinux.org/alpine/v3.19/main # cleanup rm -rf /var/cache/apk/* From 3db65f67727ce47023cc04bed925073c0c362716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=ADas=20Garc=C3=ADa=20Isa=C3=ADa?= Date: Thu, 31 Jul 2025 12:36:45 -0300 Subject: [PATCH 2/2] Upgrade postgres-backup-s3 to psql 17 (#168) * 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: honor extra opts in pg_dumpall The setting was being used in `psql`, but not when POSTGRES_BACKUP_ALL is set. * Fix: postgres-backup-s3 crontab syntax It was yielding an error "user lookup failed: user: unknown user /bin/sh" --- postgres-backup-s3/Dockerfile | 2 +- postgres-backup-s3/backup.sh | 2 +- postgres-backup-s3/install.sh | 2 +- postgres-backup-s3/run.sh | 2 +- 4 files changed, 4 insertions(+), 4 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/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}" 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/* 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