Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I know about dnscmd /enumrecords, however what I want to do is export all records from every single zone housed on this server.

I was hoping there was a simple recursive function to do this. We have 100s of DNS zones on our server, so I'm not about to run a 'dnscmd /enumrecords' manually for all of them.

share|improve this question

2 Answers 2

I have used this steps: Windows DNS Export Import

I don't have a lot of zones but quite a lot of registries on each one.


UPDTATE (solution explanation)


Exporting

  1. Export all your zones for your own safety:

    C:\> dnscmd servername /enumrecords zonename @ /type A /detail > c:\filename.txt

  2. Export the registry records:

    Run REGEDIT and navigate to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\DNS Server\Zones
    (Right-Click the key ZONES and export to a .reg file).

    or

    C:\> regedit /e c:\dns.reg "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\DNS Server"

  3. Copy *.dns from: %windir%\system32\dns

  4. Transfer all files t the new (target) server

Importing

  1. Create a test zone such as testdomain.com. The DNS server needs one zone created, but you can remove it after the import.

  2. Copy the *.dns files into %windir%\system32\dns on the new server

  3. Double click on the .reg file you created to load all the zones into the new server’s registry
    (For Windows 2008: Right click the reg. file and run as Administrator)

  4. Restart the DNS Server service

share|improve this answer
1  
We would prefer answers which describe the process, rather than simply linking to another document which might get deleted, moved or modified afterwards. –  EightBitTony Oct 23 '12 at 22:22
    
@EightBitTony I have updated to have the link and the full answer. –  Alexandre Marcondes Nov 4 '13 at 13:36

Check out the DNSShell plugin for PowerShell.

share|improve this answer
2  
I found the solution, very simple. dnscmd /zoneexport gets all the records in a zone into a text file. –  Bob Jul 28 '11 at 17:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.