Use docker to host mysqlclient, aws cli to run and upload backup to S3
2.8K
Backup MySQL to S3 (supports periodic backups).
Based on https://github.com/schickling/dockerfiles/tree/master/mysql-backup-s3
Added support for checking IAM credentials and using.
$ docker run -e S3_ACCESS_KEY_ID=key -e S3_SECRET_ACCESS_KEY=secret -e S3_BUCKET=my-bucket -e S3_PATH=backup -e MYSQL_USER=user -e MYSQL_PASSWORD=password -e MYSQL_HOST=localhost foundplaces/mysql-backup-s3
$ docker run -e S3_BUCKET=my-bucket -e S3_PATH=backup -e MYSQL_USER=user -e MYSQL_PASSWORD=password -e MYSQL_HOST=localhost foundplaces/mysql-backup-s3
You 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
Size
24.9 MB
Last updated
over 10 years ago
docker pull foundplaces/mysql-backup-s3