WenderHost

(865) 270-6715
or email us

Mirror a Dynamic Website on a CPanel/WHM Server

Recently, one of my clients asked me to mirror his web server. The only problem with this request was that I host his web site on my WHM reseller account, and his budget would only cover another shared hosting package. Mirroring one shared hosting server via another shared hosting server seemed possible; however, I knew that the budget constraints meant I would be piecing together my own solution...

Now a couple of months after his request, I am happy to report that I have successfully setup a mirror of my client's CPanel/WHM server. My technique combines the right combination of service providers, public key ssh authentication, rsync, mysqldump, and DNS Failover switching.

The Scenario
In this tutorial I am going to show you how to mirror a web server using two shared hosting accounts. Our mirror web server will automatically backup all scripts, files, and databases on the production web server. In addition, this tutorial will also describe how to setup DNS fail over switching that will monitor the status of the production server and automatically switch the DNS to point to the mirror server should the production server fail.

As this technique involves five distinct steps, I have divided this post into the following sections:

4 Responses to “Mirror a Dynamic Website on a CPanel/WHM Server”

  1. Naseer Khan says:

    Hi,
    Please could you tell me if you have ever done mirroring for the plesk web servers.
    Thanking you.
    Regards,
    Naseer.

  2. Davi Souza says:

    This is for ressellers, how to backup entire dedicated server with cpanel and whm???

    the sql sync isn“t good enough, imagine if i need to create all database of accounts??? is it possible to copy all information between the servers???

    thanks - but at all is very good tutorial....

  3. AndyW says:

    Michael, I find your article very informative and helpfull. Thank you very much for same.

    Was wondering since you posted it on 2007, how has the setup performed since then? Are you still using it or have you moved to a more advanced setup.

    Just want to get your production experience of it, before I implement it on a bunch of websites.

    Thanks in advance.

  4. Peter says:

    If the server still asks for password then you need to check the following permission in your server.

    * Change the permissions of .ssh to 700
    * Change the permissions of .ssh/authorized_keys2 to 640

    It took me 2 days to figure this out.

Leave a Reply

Copyright © 2007. All Rights Reserved.
WP Full Site Theme modified by Michael Wender. • Log in.