At present I operate a (reasonably low volume) web-hosting service with a Centos 5.3 server running cPanel/WHM.
I would like to implement a level of redundancy such that in the event of server failure, I can restore service with a minimum of effort in less than 60 minutes.
I also want to setup a secondary DNS that cPanel will replicate with. My current idea is to kill two birds with one stone by:
My current server is called "www1"
- Purchase an identical server (HP DL360 G4) with mirrored disks. Call this server "www2"
- Install Centos 5.4 (or perhaps I should install 5.3 to be identical with www1)
- Install cPanel/WHM on this server and fully license it
- Setup www1 and www2 cPanel to replicate DNS with each other
- Setup a nightly replication script that does the following: a) rsync's the /home directory from www1 to www2 b) dumps all MySQL databases on www1 and copies them to a temp folder (with root access only) on www2 c) triggers a script to run on www2 that restores the MySQL dumps
Thus each night a fully working copy of all the websites and MySQL databases is copied to www2.
I do not have enough knowledge of MySQL replication to understand if it works safely and transparently with cPanel. Thus I propose the mysql dump/copy/restore due to not knowing any better!
In the event that www1 dies a horrible death, I envisage that I could login to www2, change the IP addresses to those that www1 had, and presto, the websites are available again.
The advantage of this idea is that it is fairly simple and "low tech" and thus does not require an expert sysadmin to setup and monitor (I am NOT an expert sysadmin)
The disadvantage of this idea is that up to a full days worth of data changes would be lost. I think this would be acceptable to the sorts of customers I host at the moment. The other disadvantage would be having to pay for a full cPanel license, but I am comfortable with that cost, so for now all I want to discuss are technical considerations.
Is this a sound scheme?