This is a Docker multi-arch image designed for a single, crucial task: backing up your databases. It combines a minimal MySQL client with the powerful s3cmd S3 client, all within a lightweight Alpine Linux container. This setup allows you to create database dumps and transfer them directly to any S3-compatible object storage system.
The image is built for flexibility and efficiency. Its multi-arch support ensures it runs on most architectures, including amd64 and various ARM platforms. Because it uses a shell entry point, you can easily combine mysqldump and s3cmd commands to create custom backup scripts tailored to your specific needs.
Key features include:
latest tags for the newest updates and stable tags for environments requiring fixed, unchanging client versions.s3cmd capabilities for encryption during transfer (SSL) and at rest (server-side or client-side with GPG).services:
mysql-s3-backup:
image: angatar/mysql-s3-backup:latest
container_name: mysql-s3-backup
restart: unless-stopped
environment:
- MYSQL_HOST=mysql
- MYSQL_PORT=3306
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_DATABASE=my_database
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- S3_BUCKET=my-backup-bucket
- S3_REGION=us-east-1
- S3_ENDPOINT=https://s3.amazonaws.com
- S3_PREFIX=backups/mysql/
- CRON_SCHEDULE=0 2 * * *MYSQL_USER=root
MYSQL_PASSWORD=your_super_secret_mysql_password
AWS_ACCESS_KEY_ID=your_s3_access_key_id
AWS_SECRET_ACCESS_KEY=your_s3_secret_access_keyAuto-fetched about 19 hours ago
Auto-fetched about 19 hours ago