Forked from https://github.com/schickling/dockerfiles/tree/master/mysql-backup-s3
Backup MySQL to S3 (supports periodic backups & mutli files).
- Updated to use an Ubuntu base image with the latest MySQL Client tools
- Removed support for
SCHEDULEusing go-cron - Replaced
MULTI_FILESwithMULTI_DATABASES, always one file per DB - Removed
--databasesargument so SQL won't includeCREATE DATABASE/USEstatements - Updated default
MYSQLDUMP_OPTIONSenvironment variable
$ docker run -e S3_ACCESS_KEY_ID=key -e S3_SECRET_ACCESS_KEY=secret -e S3_BUCKET=my-bucket -e S3_PREFIX=backup -e MYSQL_USER=user -e MYSQL_PASSWORD=password -e MYSQL_HOST=localhost schickling/mysql-backup-s3MYSQLDUMP_OPTIONSmysqldump options (default: --quote-names --quick --add-drop-table --add-locks --allow-keywords --disable-keys --extended-insert --single-transaction --create-options --comments --net_buffer_length=16384)MYSQLDUMP_DATABASElist of databases you want to backup (default: --all-databases)MYSQL_HOSTthe mysql host requiredMYSQL_PORTthe mysql port (default: 3306)MYSQL_USERthe mysql user requiredMYSQL_PASSWORDthe mysql password requiredS3_ACCESS_KEY_IDyour AWS access key requiredS3_SECRET_ACCESS_KEYyour AWS secret key requiredS3_BUCKETyour AWS S3 bucket path requiredS3_PREFIXpath prefix in your bucket (default: 'backup')S3_FILENAMEa consistent filename to overwrite with your backup. If not set will use a timestamp.S3_REGIONthe AWS S3 bucket region (default: us-west-1)S3_ENDPOINTthe AWS Endpoint URL, for S3 Compliant APIs such as minio (default: none)S3_S3V4set toyesto enable AWS Signature Version 4, required for minio servers (default: no)MULTI_DATABASESAllow to have one file per database if setyesdefault: no)