Adapted (and largely modified) from https://github.com/schickling/dockerfiles/blob/master/mysql-backup-s3/Dockerfile
Backup MySQL to S3 (supports periodic backups)
MYSQLDUMP_OPTIONS mysqldump 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_DATABASE list of databases you want to backup requiredMYSQL_HOST the mysql host requiredMYSQL_PORT the mysql port (default: 3306)MYSQL_USER the mysql user requiredMYSQL_PASSWORD the mysql password requiredAWS_ACCESS_KEY_ID your AWS access key requiredAWS_SECRET_ACCESS_KEY your AWS secret key requiredS3_BUCKET your AWS S3 bucket path requiredAWS_DEFAULT_REGION the AWS S3 bucket region requiredS3_S3V4 set to yes to enable AWS Signature Version 4, required for minio servers (default: no)SCHEDULE backup schedule time, see explainations belowS3_ARGS arguments to use in S3 command, such as --storage-class=GLACIERAWS_ARGS arguments to pass to the aws part of the CLI, such as aws --endpoint=url=<endpoint> where --endpoint=url=<endpoint> is AWS_ARGSS3_FILENAME_PREFIX prefix to append to s3 filename requiredYou can additionally set the SCHEDULE environment variable like -e SCHEDULE="@daily" to run the backup automatically.
More information about the scheduling can be found here.
Content type
Image
Digest
sha256:45ae4d056…
Size
50 MB
Last updated
10 months ago
docker pull tozny/mysql-backup-s3