From 289169da588aa00640e6e51ac80b76f9aac94a8c Mon Sep 17 00:00:00 2001 From: Samuel Denis-D'Ortun Date: Thu, 4 Jul 2019 23:17:01 -0400 Subject: [PATCH 1/2] Fix issue where $AWS_ENDPOINT_OPT is ignored when $AWS_ENDPOINT_URL present --- entrypoint | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint b/entrypoint index 55000640..ea1a8a66 100755 --- a/entrypoint +++ b/entrypoint @@ -109,7 +109,7 @@ if [[ -n "$DB_RESTORE_TARGET" ]]; then if [[ "${uri[schema]}" == "file" ]]; then cp $DB_RESTORE_TARGET $TMPRESTORE 2>/dev/null elif [[ "${uri[schema]}" == "s3" ]]; then - [[ -n "$AWS_ENDPOINT_URL" ]] && AWS_ENDPOINT_OPT="--endpoint-url $AWS_ENDPOINT_URL" + [[ -n "$AWS_ENDPOINT_URL" ]] && AWS_ENDPOINT_OPT="$AWS_ENDPOINT_OPT --endpoint-url $AWS_ENDPOINT_URL" aws ${AWS_ENDPOINT_OPT} s3 cp "${DB_RESTORE_TARGET}" $TMPRESTORE elif [[ "${uri[schema]}" == "smb" ]]; then if [[ -n "$SMB_USER" ]]; then From 737646707d8fbf40829bf6d11ce90f04f611c459 Mon Sep 17 00:00:00 2001 From: Samuel Denis-D'Ortun Date: Thu, 4 Jul 2019 23:18:10 -0400 Subject: [PATCH 2/2] Fix issue where $AWS_ENDPOINT_OPT is ignored when $AWS_ENDPOINT_URL present --- functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions.sh b/functions.sh index 36c5db5b..71d8c55b 100644 --- a/functions.sh +++ b/functions.sh @@ -194,7 +194,7 @@ function backup_target() { ;; "s3") # allow for endpoint url override - [[ -n "$AWS_ENDPOINT_URL" ]] && AWS_ENDPOINT_OPT="--endpoint-url $AWS_ENDPOINT_URL" + [[ -n "$AWS_ENDPOINT_URL" ]] && AWS_ENDPOINT_OPT="$AWS_ENDPOINT_OPT --endpoint-url $AWS_ENDPOINT_URL" aws ${AWS_ENDPOINT_OPT} s3 cp ${TMPDIR}/${SOURCE} "${DB_DUMP_TARGET}/${TARGET}" ;; "smb")