Skip to content

An Ansible role to backup MySQl databases to AWS S3 using a docker container

License

Notifications You must be signed in to change notification settings

opichon/ansible-mysql-backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Role: Backup MySQL databases to AWS S3 via Docker container

An Ansible role to backup MySQL databases to AWS S3 via a Docker container. This role uses the iainmckay/mysql-backup docker image.

See also opichon.docker-mysql

Requirements

This role requires Ansible 1.2 or higher.

It also requires the Docker engine to run on the target host.

Role variables

Ansible variables are listed below with their default values.

mysql_backup_command: backup
mysql_backup_aws_access_key_id
mysql_backup_aws_secret_access_key
mysql_backup_aws_region
mysql_backup_host
mysql_backup_user
mysql_backup_password
mysql_backup_s3_bucket
mysql_backup_s3_path

For the meaning of these variables, see the documentation of the iainmckay/mysql-backup docker image.

Example playbooks

---
- 	hosts: mysql_server
	roles:
		- name: Backup db1 and db2 databases
		  role: opichon.mysql-backup
		  mysql_backup_command: backup db1 db2
---
- 	hosts: mysql_server
	roles:
		- name: Restore db1 and db2 databases
		  role: opichon.mysql-backup
		  mysql_backup_command: restore db1 db2

License

MIT

About

An Ansible role to backup MySQl databases to AWS S3 using a docker container

Resources

License

Stars

Watchers

Forks

Packages

No packages published