Saturday, March 21, 2009

Restore DNS Windows 2003

If you need to restore DNS on Windows 2003 to another server here is one method that works for me. I use it to backup DNS on one web server and restore it on another windows 2003 web server at my hosting company godaddy. I use the Godaddy Virtual Private Servers and try to make then identical. The reason I mention my use of DNS at my hosting provider is that this is not written for active directory enabled zones etc. Just for restoring my simple primary DNS zones.

To restore DNS zones on Windows 2003 first stop the DNS server on both servers using net stop DNS or using the services gui.
Then copy the contents of the c:\windows\system32\dns folder to the same folder on the server that you want to restore DNS on.
Next go to regedit on the server that your backing up DNS on and find the key HKLM\Software\Microsoft\WindowsNT\Current Version\DNS Server\Zones
Highlight this key and export it to a .reg file. Copy that file to your new DNS server and double click it to import your zones into your registry.
Now start the DNS service by running net start DNS. You might also reboot the dns server and you "should" see your newly restored zones in DNS.
In my case when restoring DNS it took a bit of time for some reason so if at first you don't see your restored DNS zones be patiend and perhaps time and reboots will finally show up.