Browse Source
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"
master
Matías García Isaía
2 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with
4 additions and
4 deletions
postgres-backup-s3/Dockerfile
postgres-backup-s3/backup.sh
postgres-backup-s3/install.sh
postgres-backup-s3/run.sh
@ -1,4 +1,4 @@
FROM webdevops/go-crond:master -alpine
FROM webdevops/go-crond:main -alpine
LABEL maintainer = "Johannes Schickling <schickling.j@gmail.com>"
LABEL maintainer = "Johannes Schickling <schickling.j@gmail.com>"
ADD install.sh install.sh
ADD install.sh install.sh
@ -71,7 +71,7 @@ if [ "${POSTGRES_BACKUP_ALL}" == "true" ]; then
fi
fi
echo " Creating dump of all databases from ${ POSTGRES_HOST } ... "
echo " Creating dump of all databases from ${ POSTGRES_HOST } ... "
pg_dumpall -h $POSTGRES_HOST -p $POSTGRES _P ORT -U $ POS TGRE S_USER | gzip > $SRC_FILE
pg_dumpall $POSTGRES_HOST_OPTS | gzip > $SRC_FILE
if [ " ${ ENCRYPTION_PASSWORD } " != "**None**" ] ; then
if [ " ${ ENCRYPTION_PASSWORD } " != "**None**" ] ; then
echo " Encrypting ${ SRC_FILE } "
echo " Encrypting ${ SRC_FILE } "
@ -5,7 +5,7 @@ set -eo pipefail
apk update
apk update
apk add openssl aws-cli
apk add openssl aws-cli
apk add postgresql-client --repository= https://dl-cdn.alpinelinux.org/alpine/v3.19/main
apk add postgresql-client
# cleanup
# cleanup
rm -rf /var/cache/apk/*
rm -rf /var/cache/apk/*
@ -9,6 +9,6 @@ fi
if [ " ${ SCHEDULE } " = "**None**" ] ; then
if [ " ${ SCHEDULE } " = "**None**" ] ; then
sh backup.sh
sh backup.sh
else
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
exec go-crond /etc/crontabs/root
fi
fi