Windows 2008 DNS Backup and Recovery

Leave a comment

July 27, 2011 by Rakesh Boraiah

If you thought configuring DNS in the first place was difficult, you’ll find the backup and recovery procedures refreshingly simple. There are two locations in the Registry to back up the DNS service and one directory on the physical filesystem.

Note: The following procedure won’t work with Active Directory-integrated zones, as the zone files are within the directory service and are not available on the filesystem.

To back up a server that’s hosting one or more primary or secondary DNS zones, follow these steps:

  • On the nameserver, stop the DNS service using the Services applet in the Control Panel or through the command line.
  • Open the Registry Editor (select Start/Run, type regedit, and press Enter).
  • Navigate to the HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\DNS key.
  • Right-click the DNS folder, and from the context menu, choose Export.
  • When prompted for a filename, enter DNS-CCS, and choose an appropriate location that is off the server.
  • Now, navigate to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DNS server key.
  • Right-click the DNS Server folder, and from the context menu, choose Export.
  • Name this file DNS-CV, and again choose a location that is not on the current server. These two files will be DNS-CCS.REG and DNS-CV.REG.
  • Now, using Windows Explorer, navigate to the %SystemRoot%\System32\dns directory on the boot drive.
  • Find all files with the .DNS extension, select them, and then copy them to the same location that you exported DNS-CCS.REG and DNS-CV.REG.

Your DNS service is now completely backed up. Restart the DNS service to continue using it.

To restore a set of DNS configuration files, install a Windows Server 2008 machine and use the same computer name, DNS suffix, and IP address. Be sure to install the DNS service. Then copy all of the .DNS files from your backup to the %SystemRoot%\System32\dns directory, and stop the DNS service. Double-click DNS-CCS.REG and confirm that you want its contents imported into the Registry; do the same for DNS-CV.REG. Finally, restart the DNS service, and your replacement server should function normally.

Note: If you want to move only the primary role for a particular zone from one nameserver to another, simply copy the .DNS file for that zone to the target computer. Run the New Zone Wizard as described earlier in this chapter, and then instruct it to use a pre-existing zone file.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: