mirror of
https://github.com/tiredofit/docker-db-backup.git
synced 2025-12-21 13:23:12 +01:00
Merge pull request #91 from alexbarcelo/minio_fix
MINIO support by reacting to S3_HOST
This commit is contained in:
@@ -420,7 +420,10 @@ move_backup() {
|
||||
export AWS_ACCESS_KEY_ID=${S3_KEY_ID}
|
||||
export AWS_SECRET_ACCESS_KEY=${S3_KEY_SECRET}
|
||||
export AWS_DEFAULT_REGION=ap-northeast-2
|
||||
aws s3 cp ${tmpdir}/${target} s3://${S3_BUCKET}/${S3_PATH}/${target}
|
||||
|
||||
[[ ( -n "${S3_HOST}" ) ]] && PARAM_AWS_ENDPOINT_URL=" --endpoint-url ${S3_PROTOCOL}://${S3_HOST}"
|
||||
|
||||
aws ${PARAM_AWS_ENDPOINT_URL} s3 cp ${tmpdir}/${target} s3://${S3_BUCKET}/${S3_PATH}/${target}
|
||||
|
||||
rm -rf ${tmpdir}/*.md5
|
||||
rm -rf ${tmpdir}/"${target}"
|
||||
|
||||
Reference in New Issue
Block a user