A backup service to backup a MySQL database
388
This Docker image provides a backup service to backup a MySQL database. The service can be added into a docker stack with a MySQL instance to backup the database periodically.
All backups are located in /backups. Each backup has a date prefix 2019-05-19T20.48.dump.tag.gz.
All scripts are located in /usr/local/bin and can be called manually. E.g.
docker exec -it application_backup docker-entrypoint.sh backup
The service is supposed to be part of a Docker service stack.
version: '2'
services:
app:
[...]
backup:
image: vinado/backup-mysql:latest
depends_on:
- app
volumes:
- backups:/backups
environment:
CRON_PERIOD: "0 0 * * 1"
MYSQL_HOST: "database"
MYSQL_DATABASE: "<db_name>"
MYSQL_USER: "<db_user>"
MYSQL_PASSWORD: "<db_password>"
BACKUP_ROTATIONS: "30"
volumes:
backups:
driver: local
The source is available on GitHub. Please report any issues.
To build the image from the Dockerfile run:
docker build -t vinado/backup-mysql:latest .
Content type
Image
Digest
Size
11.2 MB
Last updated
over 4 years ago
docker pull vinado/backup-mysql