Docker container using automysqlbackup for daily backups of a MySQL database
10K+
Container to automatically back up mysql using automysqlbackup.
This is designed to run on CoreOS and includes a mysqlbackup.service unit and a mysqlbackup.timer unit which fires up the container once per day and saves the backups to a volume mounted on the host. From there I rsync it off site.
It uses ssmtp as a lightweight mailer for any logs and all relevant settings are done either via "-e" environment variables, or through editing the automysqlbackup.default file.
Example run command line:
docker run --rm -v /var/container_data/mysqlbackup/:/var/lib/automysqlbackup \
--link revive-mysql:mysql \
-e DB_HOST=<mysql host> -e DB_USER=<db_user> -e DB_PASS=<db_pass> \
-e MAILTO=<who to email logs to> -e MAILFROM=<who the email should come from> \
-e SMTP_USER=<Auth for ssmtp> -e SMTP_PASS=<password for ssmtp> \
barryflanagan/automysqlbackup
See https://github.com/flantel/coreos-mysqlbackup/ for the complete source, .service and .timer files.
Content type
Image
Digest
sha256:394652bda…
Size
88.7 MB
Last updated
almost 11 years ago
docker pull barryflanagan/automysqlbackup