Create Ansible playbook to copy mysql database

Job ID: 35310734

Budget: $10 – $30 USD

I want to backup databases running on local servers and restore them to a remote server
playbook should be able to back up databases from multiple servers and restore to the remote server

Steps

1. connect to host server and backup all 4 databases to destination /var/backups
2. backed up databases should be in the format (hostname_db1, hostname_db2, hostname_db3, hostname_db4)
3. connect to remote server and check if databases from host server exist, check to see if hostname_db1, hostname_db2, hostname_db3, hostname_db4 exist.
if not create databases in remote server
4. restore backup (hostname_db1, hostname_db2, hostname_db3, hostname_db4) from host at /var/backups to remote server

I would like a single play book to go through 40 different servers to do this

I can give more details if needed
Related categories: Linux MySQL Database Administration DevOps Ansible