Fully Synced Cpanel Servers

joaquimsa

Registered
Jun 17, 2010
4
0
51
Hi,

I've been reading severall posts regarding this issue, and in some of them i found ideas in how to achieve what i describe below

Basically i want to have 2 mirrored cpanel servers fully synced and where each one can serve the websites requests at any time.
I'm removing the Mysql from the equation since i plan to use an remote cluster for the effect.
Also DNS would be external.

So basically we get left with syncing files and cpanel configurations. Knowing the needed files it would be quite easy to cron an rsync or even creating a live sync service.

However i have a doubt that is regarding the different IP that the servers would have.
How can we sync all definitions of the services and keep aware that we would have different IPs in each server, so configurations must reflect that? I',m imagining problems on apache confs probably .


Thanks in advance for any insights on these one.

J. Sa
 

joaquimsa

Registered
Jun 17, 2010
4
0
51
Hello,

Users will have acess to the control panel , no matter the server active at the moment . Changes done in the user account must be replicated .
Also if a new account is added it must exists in both servers, i guess we need to sync cpanel configurations , users files, etc.
 

joaquimsa

Registered
Jun 17, 2010
4
0
51
Seems the right direction, in fact doing an IP replace on the files after the sync and rebuilding apache seems a light and simple operation.

I will start doing some tests.

Thanks a lot.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463

dalem

Well-Known Member
PartnerNOC
Oct 24, 2003
2,983
159
368
SLC
cPanel Access Level
DataCenter Provider
we sync one of our servers across data centers
/usr/bin/rsync -vrplogDtH -e "ssh -p#" --delete --exclude=virtfs/ --exclude=sites_we_dont_want_to_replicate/ /home/ [email protected]:/home

DNS is hosted elsewhere round robin
Databases are dumped and loaded on the fall over server every 15 minutes (good enough for what we are using it for)
the rsync every hour (good enough for what we are using it for)

both servers are configured exactly the same works like a charm
the mail settings do not change from server to server so we do not need to sync that
but you could sync some of the configs over just as well (only the things that change )