From b9a34e26ffddf5e9fbb4b567fb5878910cafbccd Mon Sep 17 00:00:00 2001 From: briskt <3172830+briskt@users.noreply.github.com> Date: Fri, 21 Nov 2025 23:05:51 +0800 Subject: [PATCH 1/2] use the AWS CLI instead of s3cmd --- Dockerfile | 33 +++++++++++---------------------- application/backup.sh | 14 ++++++-------- application/restore.sh | 4 ++-- 3 files changed, 19 insertions(+), 32 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9c759fd..2bde1fe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,28 +1,17 @@ -# With Python 3.12.4 on Alpine 3.20, s3cmd 2.4.0 fails with an AttributeError. -# See ITSE-1440 for details. FROM python:3.12.4-alpine -# Current version of s3cmd is in edge/testing repo -RUN echo https://dl-cdn.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories +RUN < Date: Mon, 24 Nov 2025 14:25:19 +0800 Subject: [PATCH 2/2] add missing `?` deleted by accident Co-authored-by: Michael Wilson <70765247+hobbitronics@users.noreply.github.com> --- application/backup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/backup.sh b/application/backup.sh index da4cb3c..56398c8 100755 --- a/application/backup.sh +++ b/application/backup.sh @@ -121,7 +121,7 @@ fi # Upload compressed backup file to S3 start=$(date +%s); -aws s3 cp "/tmp/${DB_NAME}.sql.gz" "s3://${S3_BUCKET}/${DB_NAME}.sql.gz" || STATUS=$ +aws s3 cp "/tmp/${DB_NAME}.sql.gz" "s3://${S3_BUCKET}/${DB_NAME}.sql.gz" || STATUS=$? if [ $STATUS -ne 0 ]; then error_message="${MYNAME}: FATAL: Copy backup to ${S3_BUCKET} of ${DB_NAME} returned non-zero status ($STATUS) in $(expr ${end} - ${start}) seconds."; log "ERROR" "${error_message}";