How can I Backup the DNS and Restore it?


please if I have a DNS and it has zones settings, how can make a Backup and restore it if some problems happend.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Fatal_ExceptionSystems EngineerCommented:
I believe the zones are located in the %systemroot%\system32\dns folder, but if you run an AD integrated DNS, you will more than likely, if you have trouble, end up doing an Authoritative Restore of the server.  In this case you will need to backup your system state using a backup utility, and restore from that...  (I know just enough about DNS to get out of most jams...:)
Fatal_ExceptionSystems EngineerCommented:
Okay, just so happens I was reading an article on DNS from MCP Magazine and they have the answer for you...  I would post the entire column, but it is fairly long..  so here is only one way, and I suggest you read the entire article:

ith DNS, backing up primary and secondary zones independent of the system state is a pretty simple process. You can use the xcopy command to back up all zone text files on a DNS server. This command would back up the contents of the default DNS folder to the "D:\backups\dns" folder:

xcopy %systemroot%\system32\dns d:\backups\dns /y
Unfortunately, the process isn’t as simple for Active Directory-integrated DNS zones. For these zones, the support tool dnscmd.exe can get the job done. To back up any DNS zone with dnscmd.exe, you just need to use the /zoneexport switch with the command. To back up the zone locally on a DNS server, you'd run:

dnscmd /zoneexport backup\
This command writes a copy of the zone to the %systemroot%\system32\dns\backup\ file. Note that the command doesn't overwrite existing files, so if you’re including it with a backup script, be sure to move the file to an alternate location after the export completes, or to rename or delete the current backup file before you run a new dnscmd /zoneexport job.

If you need to re-create a new zone from the export file, you’ll find that you can do this by using dnscmd.exe with the /zoneadd switch. The only catch with this approach is that if you’re looking to recover an AD-integrated zone, you need to add the zone as a primary first and then convert it to AD-integrated. For example, to recover my zone, I'd run:

dnscmd /zoneadd /primary /file /load
Here, note that the backup file needs to reside in the %systemroot%\system32\dns folder for it to be properly discovered. Use the /load switch to tell the command to load the configuration from the existing file. Without it, the command will create a new zone data file that will overwrite the contents of the backup file.

After adding the zone to the DNS server, you can convert it to an AD-integrated zone by running:

dnscmd /zoneresettype /dsprimary
At this point, you can then enable secure dynamic updates for the zone by running:

dnscmd /config /allowupdate 2
This command configures the zone to accept only secure dynamic updates, as specified by the allowupdate value of 2 (use 0 to specify No dynamic updates, 1 for nonsecure and secure dynamic updates).

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Networking

From novice to tech pro — start learning today.