Hello everyone,

I have a small problem ahead of me. I run a hosting company and am going to start offering syncing services to my clients. I am going to use DNS failover to monitor the main server and if that should go down, kick it over to the secondary server for minimal downtime.

I will also be using rsync to update the necessary files to the second server.

My question is, how would I go about setting something up that would automatically sync the necessary mysql databases?

Here's how it would work right now:

1. I would modify the necessary config file for the rsync script to include the customers who paid for the service. It will only sync those accounts. These accounts are located in /home/acctname
2. The mysql dbs are located at /var/lib/mysql folder (you probably knew that), so, I could use rsync to just copy them over, but the hardest part is to actually apply the updates to the databases on the second server. How can I go about doing this?

Thanks for any help!