Skip to content

Commit 2c1b89e

Browse files
committed
support running postgres 15/16 if need be
1 parent ab11f9e commit 2c1b89e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# mysql backup image
22
FROM alpine:3.17
3-
LABEL org.opencontainers.image.authors="https://github.com/deitch"
3+
LABEL org.opencontainers.image.authors="https://github.com/halkeye"
44

5-
RUN apk add --no-cache --update postgresql-client bash python3 py3-pip samba-client shadow openssl coreutils && \
5+
RUN apk add --no-cache --update postgresql-client postgresql15-client bash python3 py3-pip samba-client shadow openssl coreutils && \
66
touch /etc/samba/smb.conf && \
77
pip3 install awscli
88

functions.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ function do_dump() {
9595
export PGPASSWORD="${DB_PASS}"
9696
export PGUSER="${DB_USER}"
9797

98+
PG_DUMP_PATH="${PG_DUMP_PATH:-pg_dump}"
99+
98100
# what is the name of our source and target?
99101
now=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
100102
# SOURCE: file that the uploader looks for when performing the upload
@@ -146,7 +148,7 @@ function do_dump() {
146148
# skip db if it is in the exclude list
147149
continue
148150
fi
149-
$NICE_CMD pg_dump ${onedb} $PGDUMP_OPTS > $workdir/${onedb}_${now}.sql
151+
$NICE_CMD ${PG_DUMP_PATH} ${onedb} $PGDUMP_OPTS > $workdir/${onedb}_${now}.sql
150152
[ $? -ne 0 ] && return 1
151153
done
152154
else

0 commit comments

Comments
 (0)