Tech

Guides
 

Export DNS zones to a text file

By Rick Vanover, Special to ZDNet Asia
Saturday, October 10, 2009 09:38 AM

Many of the more powerful network commands in Windows Server can be done with the command line. Netsh is one that I have covered a bit, and dnscmd is another that can give administrators a lot of functionality in protecting their DNS zones.

Before the naysayers light up the comments below I must mention that I'm not suggesting this as a replacement for a backup of your Windows-integrated DNS servers. I'm proposing an export of the DNS zones (ideally as a scheduled task) to a flat file that you can see what the zones contained in a point of time. This can be to accommodate what was changed, added, or deleted when looking through oddities that come up with administering a Windows Active Directory integrated DNS server.

To get started with dnscmd, this command may need to be installed on your server depending on its current configuration. It is most frequently installed with the server support tools pack for the server version you are using. Default installations put the command in the C:\Program Files\Support Tools path.

In the example I will use, I will put the DNS zones to the C:\zonex folder locally on the DNS server. To export a DNS zone to a text file, run the following commands:

dnscmd 10.187.187.200 /ZoneExport RWVDEV.INTRA rwvdev-dot-intra.txt
move c:\windows\system32\dns\rwvdev-dot-intra.txt c:\zonex /Y

This will export the zone RWVDEV.INTRA from server 10.187.187.200 to the file rwvdev-dot-intra.txt. The next line moves it to the zonex path where I would like to keep these for archival and review.

A little tweaks for your environment and you can be ready to go quite quickly with this script. This can be easier for DNS forensics as well as possibly more attractive than a restore if you know what changed by reviewing the export.

Rick Vanover is a systems administrator in Columbus, Ohio. Rick has over 12 years of IT experience and focuses on virtualization, Windows-based server administration, and system hardware.



WORTHWHILE?

0

0 votes
Blog

Talkback 0 comments

There are currently no comments for this post.


Guest user

Guest user

Level: 
Joined: —
Already a member? Log in »



 

Loading...

Whitepapers/Case Studies

Downloads

Network Administration News



Tech Jobs Now!

Tags

  1. bank
  2. business strategies & functions
  3. china
  4. cio
  5. environment
  6. financial
  7. hardware
  8. india
  9. industry
  10. information technology
  11. infrastructure / architecture management
  12. it outsourcing
  13. job
  14. leadership
  15. outsourcing
  16. revenue
  17. security
  18. software
  19. web
  20. web 2.0