WenderHost

(865) 270-6715
or email us

Mirror a Dynamic Website on a CPanel/WHM Server

Step 5: Enabling DNS Failover Switching
Enabling DNS Fail Over switching is a fairly straightforward process with a business membership ($59.95/year) at DNS Made Easy. I will refer you to their web site for setup as they have good documentation and good tech support. However, as an overview, I will point out that the basic process involves setting up a record for your domain in your DNS Made Easy account. You will then add two A records:

  • One A record will be your main domain without a preceding www. It will point to the IP address of your production server.
  • Your second A record will be the subdomain for your mirror (e.g. mirror). So that mirror.yourdomain.com will resolve to the IP address of your mirror server.

In addition, you will probably also want to have a CNAME record for www that will alias to your main domain. Once you have your domain setup, you will need to change the DNS for your domain to point to the DNS at DNS Made Easy.

Finally, after your domain is working off of DNS Made Easy's name servers, you can go into your A record for your production server and turn on DNS Fail Over and System Monitoring. As a part of my system monitoring setup, I monitor a database connection script on my production server. Therefore, to test the Fail Over switching, I simply force my database connection script to fail. After doing this, the system will detect the "failure" within three minutes and send me an SMS alert. Then after another 20 to 25 minutes, the switch over has propagated to my network and my mirror server shows up via the main domain for the production website.

Conclusion
As I mentioned, there are a lot of "moving parts" to this tutorial. Therefore, should you decide to replicate my process, you may hit a snag that I encountered or one that I haven't even considered. If that is the case, I will try to help. Furthermore, I welcome anyone else to share their advice as well.

My main goal in writing this is to provide the typical freelance web developer a conceptual framework for mirroring a web server. As I was developing my technique, I realized that while there are many networking experts who know how to mirror a web server, there wasn't a place where your typical freelancer could go to learn how. There might be a piece of the puzzle here or there; however, putting together the pieces was a difficult task. Therefore, I hope this tutorial offers a useful compilation and contribution to the Internet knowledge base.

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.