Author Topic: cPanel DNS - Moving from one system to another? Check this out!  (Read 5542 times)

Offline Douglas

  • Solar VTG Staff
  • Sr. Member
  • *****
  • Posts: 447
    • View Profile
    • My Blog
cPanel DNS - Moving from one system to another? Check this out!
« on: January 22, 2013, 01:50:30 PM »
FAIR WARNING: This information is being posted by me (Douglas). If you are not comfortable in administering your own server, please contact the SolarVPS Tech Support Engineers to help you with any DNS/IP Manipulations you need to have done.  IF you follow this guide, you are doing this on your own accord. If something breaks while you are performing the steps below, then you must tell the techs that you were using this guide when something went awry.

This also works if you're going through an IP Migration project and need to get your TTL's (Time To Lives) dropped down)


I've been asked time and time again how I'm able to move a huge site and have DNS fully propagated within 15 minutes after I make the necessary changes to the A records (Changing from A.B.C.D IP over to W.X.Y.Z IP address). I'm going to turn you onto a nifty little trick that I use to help speed up the process.

About a week before the actual site/server move, I change all of the DNS Time to Lives (TTLs) down to 300 - 900 seconds (5 to 15 minutes). This means that as soon as I change the IPs for the website(s) involved, literally within 15 minutes, the world is seeing the site live on the new servers.

Generally, I run both the old location and the new location side by side, with all of the database stuff in various scripts on the old location actually using the databases on the new location (I also turn off file uploading) for at least 3 days. Once a good majority of the visitors see the site on the new location (I help them with this by putting a "NEW" image up on the new location site to help identify which location they're looking at), I then safely shut down the old location and re-enable uploading.

If you're hosting DNS on your own VPS, there are steps that you can take to quickly change everything. The steps below cover cPanel DNS services, though it might work for DirectAdmin, as long as the naming conventions and directories are the same.

Log in as root
CD /var/named
perl -pi.bak -e "s/14400/900/g" *.db

Restart Named.


By doing these changes in advance, this will greatly speed up the overall time for the migration project. One of our team members have been able to move a huge site (MySQL DB alone was 2.5 gigs) in literally 3 hours and have everyone see the site on the new server using the methodologies outlined above.
Douglas Hazard (@BearlyDoug on Twitter)
Blog: | No longer working in the Hosting industry!

Please contact (and not me) for all your VPS/DDS needs.  :)