New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Keep multiple servers in sync, incl. MySQL
Hi!
I have a web server with vestacp - apache, mysql.
I need a complete backup solution, which would keep all of my files inside /home/admin/web and all of my SQL databases in sync with 1 or more backup servers.
Best thing would be to keep the 2 servers in sync AND to create hourly backups of the SQL databases in case of data loss.
Can you point me to the right direction here? Maybe there is a tutorial for this on lowendtalk?
Thanks for your help.
Comments
Are you just looking to create a backup on the backup server, or to use the backup server as a failover for the main one?
If only backups, use https://www.digitalocean.com/community/tutorials/how-to-set-up-master-slave-replication-in-mysql or use xtrabackup
If you need failover, you will need 3 servers for master/master mysql replication. Mariadb+Galera is more complicated than needed, use Percona XtraDB Cluster for easiness.
For file syncing, use syncthing or some other syncing tool
I've heard good things about Galera Cluster: http://galeracluster.com/products/
And a friend made a script using Galera Cluster for load balancing: https://github.com/tnyim/picored
Edit: Well, picored is more like a HA solution.
I use Galera Cluster and it works great. You can even have a remote slave for DR purposes.
For file syncing, I'm currently split between csync2 and Syncthing. Not sure which one I like better.
I too have used Galera Cluster for a couple of projects and its super simple to set up and just works!
Galera Cluster nice information, thanks for share