mysqldump, compress, and upload to a specific AWS S3 Bucket via awscli.
https://github.com/hortopan/mysql-aws-s3-dump
docker run -e CONNECTION_STRING=mysql://user:pass@mysql-host:3306/database -e BUCKET_DESTINATION=bucket/prefix hortopan/mysql-aws-s3-dump
HOST=hostname
USER=user
PASS=password
PORT=3306
BUCKET_DESTINATION=bucket/bucketPrefix
WORK_DIR=/tmp
You can also configure the mysql connection via a mysql connection url string
:
CONNECTION_STRING=mysql://user:password@hostname:port/database
This uses aws cli so you will need to configure AWS cli as desired.
DATE_FORMAT="+%d-%h-%Y-%H-%M-%S"
: output date format for file name.TABLES=table1 table2
: dump specific tablesCOMPRESS=true
: compress with tar/gzipDB
: dump specific database