I try to build a standby-server.
I have 2 identical servers. One hosts my websites and on the second i run copies of my websites for case of server failure on the main server.
Because I use sucuri in front of the servers I entered second servers IP as fallback server.
That works.
But now the question: How can I automate the mirroring of the first server to the second?
At the moment I use manual the “Remote Backup” function. Thats exactly what I need: a copy of the the whole website including the database and all settings.
A normal “rsync” in cron will not do the job, because Wordpress needs it´s database.
So the question: Is there a chance to automate the “Remote Backup” or any other tips?
In front of “Remote Backup” the old copy of the website has to be deleted. So it´s a 2 step process I need:
- Auto-Delete Website from fallback server
- Auto-Remote Backup from main server to fallback server
Would be nice if someone can give me hints or help