From f3a691641f002d01a4bff54d5fee51d2f51646ed Mon Sep 17 00:00:00 2001 From: Michael Zaikin Date: Mon, 26 Jun 2023 14:02:03 +0300 Subject: [PATCH 1/5] PG 15 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index ad33265..e18f33d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM alpine:3.15 RUN apk update \ - && apk --no-cache add dumb-init postgresql-client curl aws-cli + && apk --no-cache add dumb-init postgresql15-client curl aws-cli RUN curl -L https://github.com/odise/go-cron/releases/download/v0.0.7/go-cron-linux.gz | zcat > /usr/local/bin/go-cron && chmod +x /usr/local/bin/go-cron @@ -9,4 +9,4 @@ COPY entrypoint.sh . COPY backup.sh . ENTRYPOINT ["/usr/bin/dumb-init", "--"] -CMD ["sh", "entrypoint.sh"] \ No newline at end of file +CMD ["sh", "entrypoint.sh"] From d81158a77449a608affc28cc4727cf6a111767a1 Mon Sep 17 00:00:00 2001 From: Michael Zaikin Date: Mon, 26 Jun 2023 14:12:11 +0300 Subject: [PATCH 2/5] Bump alpine --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e18f33d..fb73f85 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.15 +FROM alpine:3.18 RUN apk update \ && apk --no-cache add dumb-init postgresql15-client curl aws-cli From 5099de2909d7b281c7c09d7861e0c41228c0e1ba Mon Sep 17 00:00:00 2001 From: Zaariel91 <115039613+Zaariel91@users.noreply.github.com> Date: Tue, 10 Dec 2024 21:44:04 +0300 Subject: [PATCH 3/5] Update backup.sh for timescale pg-15 --- backup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backup.sh b/backup.sh index 5f2ab59..0b180c7 100644 --- a/backup.sh +++ b/backup.sh @@ -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 > dump.backup + pg_dump -Fc $POSTGRES_HOST_OPTS $POSTGRES_DB -f dump.backup aws configure set default.s3.multipart_chunksize 16MB if [ "${PRIVATE_BACKUP}" == "true" ] || [ "${PRIVATE_BACKUP}" == "1" ]; then 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 4/5] 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 From d8c11547e1dc440b9559a25bb28a389b8681b4ca Mon Sep 17 00:00:00 2001 From: Zaariel91 <115039613+Zaariel91@users.noreply.github.com> Date: Tue, 10 Dec 2024 21:58:56 +0300 Subject: [PATCH 5/5] Update backup.sh --- backup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backup.sh b/backup.sh index 2cbdbde..ca0f144 100644 --- a/backup.sh +++ b/backup.sh @@ -55,7 +55,7 @@ case "${PG_BACKUP_ACTION:-dump}" in # TODO: check if database is fresh echo "Snapshotting $POSTGRES_DB database" - pg_dump -U $POSTGRES_USER -h $POSTGRES_HOST -p $POSTGRES_PORT -d $POSTGRES_DB -Fc -f dump.backup + pg_dump -U $POSTGRES_USER -h $POSTGRES_HOST -p $POSTGRES_PORT -d $POSTGRES_DB -Fc -b -v -f dump.backup aws configure set default.s3.multipart_chunksize 16MB if [ "${PRIVATE_BACKUP}" == "true" ] || [ "${PRIVATE_BACKUP}" == "1" ]; then