MySQL/MariaDB S3 docker/kubernetes backup
Docker image to backup MySQL or MariaDB (or PerconaDB) database to S3 using mysqldump and compress using pigz.
Features
- Supports custom S3 endpoints (e.g. minio)
- Uses piping instead of tmp file
- Compression is done with pigz (parallel gzip)
- Can be run in Kubernetes or Docker
- Backup all databases
- Backup schedule
Configuration
- FILE_PREFIX=
- S3_BUCKET=
- S3_ACCESS=
- S3_SECRET=
- S3_SERVER=
- DB_USER=
- DB_PASSWORD=
- DB_HOST=
- DB_PORT=# (optional) defaults to 3306
- WAIT_SECONDS=86400
- INITIAL_BACKUP=yes
Or see docker-compose.yml
file to run this container with Docker.
Cron backup with kubernetes
See kubernetes-cronjob.yml
file.