Replies: 0
I have two nearly identical VPSes. Both are configured with LAMP stack to function as a wordpress webserver. The only differences being that 1) they are located in different datacenter, and 2) one of them is spec’ed with less memory and storage. Both are running Ubuntu 16.04.
I want to mirror both the site files (var/www/) and the databases. Full webserver replication, essentially.
The idea being to make disaster recovery pretty painless by being able to just point the domains at the “backup” webserver.
This is not intended for a traditional backup to recover files. I will handle that by backing up (daily/weekly/monthly) to a different location.
I need to use incremental backups to save bandwidth, so I know I will be using RSYNC.
I get the basics of cron and using rsync, but what I could use help with is automating the mysql dump and transferring the databases at the same time as the /var/www files.
Can anybody help me out? What is the best way to affect this? Bash script? If so, how do I include the sql dump with the rsync?