Mirror a Dynamic Website on a CPanel/WHM Server
Jun 11th, 2007 by Michael
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.

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