Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a simple question for which I have not been able to find a simple answer. Here's the scenario:

Server 1: WHM/cPanel with multiple accounts/dbs

Server 2: WHM/cPanel with multiple accounts/dbs

Server 3: Heartbeat for Server 1. (Wwitches the routes to Server 2 in case Server 1 is unavailable.)

Question: How do I synchronize Server 1 and Server 2? I can sync the DNS settings using the cluster features but what about the files/dbs? I'm prepared to get my hands wet with some coding but I have no idea how to go about this.

Regards, Nauman.

share|improve this question

closed as too broad by Jenny D, Sven Apr 15 '15 at 8:27

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 1 down vote accepted

In general, if you want to do High Availability, Control Panels are going to either massively screw things over or complicate things to the point where things are so fragile that a single wrong step will cause breakage. You also run into the risk of licensing not working, although I'm not familiar enough with WHM/CPanel to say for sure if that will be an issue.

The only reliable way I've found of doing High Availability when control panels are involved is to virtualise the host with the control panel, and then rely on whatever virtualisation tech you use to handle the failover. Then as far as the control panel is concerned, it's on one host and it's happy.

In my case, I've used Xen with a DRBD backend. I have a Xen DomU running on each server with it's own copy of DirectAdmin in this case, and heartbeat manages the failover of the DomU between the two. You do the same with other Virtualisation technologies.

share|improve this answer
Does Xen make DRBD better? You make it sound like virtualization is crucial here. If I have two physical boxes, can't I get the same thing w/o Xen? – Tom Dworzanski Sep 29 '14 at 11:13
Think of DRBD as the poor man's SAN. If you have two physical boxes, you're likely to run into licensing issues with most of the commercial control panels if running on multiple boxes. By putting it on a virtual machines, you can bounce that virtual machine between physical hosts. – Niall Donegan Sep 29 '14 at 11:42
Thanks for the clarification. – Tom Dworzanski Sep 29 '14 at 11:44

If the files do not change frequently, you can use rsync or Unison. You can also use replication at the level of block devices(DRBD) or cluster file system(GlusterFS,GFS).

To synchronize the database, you can use replication.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.