MySQL Database sync - what and how?

I’m interested in setting up a site where I have one mySQL DB which is backup for another site with mySQL server.

So everytime any changes happens to the Master the Slave on my Virtualmin server is updated.

How can I do this?


Are you looking to generate Virtualmin backups on your primary server, and then restore those to the remote server on a regular basis?

Or are you looking to setup something where the second database server is always in sync with the primary, a master-slave replication sort of thing?

The first is a lot simpler to setup, but the data in the backup database server isn’t as current.

However, if you’re performing regular Virtualmin backups and restores from your main server to this backup, the entire server could function as a backup to your primary.