Need help: Howto build a standy-Server

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:

  1. Auto-Delete Website from fallback server
  2. Auto-Remote Backup from main server to fallback server

Would be nice if someone can give me hints or help

The thing you are thinking about to achieve is called load balancing where if one server is busy, the contents are served from alternate server which is in sync.

Its a server level operation and needs good knowledge in setting things up.

Thanks for your answer. It´s a kind of. I don´t need absolute sync of both servers. It´s enough to have mirrored the wordpress on the first server to the wordpress on the second server on a daily base. It´s only a website wit CMS generated pages - no ordering system or so.

Load balancing is not needed. I need a fallback server. I use sucuri in front of the websites and there I can register a second server for fallback if the first goes down.

The easiest way could be if Cyberpanel API can be used for 2 things: 1) Delete a website 2) Remote Backup a website

I only need this 2 things driven by a cron job :slight_smile:

But I think it´s not part of the current API