Aleksandar's computer workshop

Let's see what Aleksandar was fixing today.
My findings, tips & tricks related to computers, internet, programming and other stuff I was working with.

How to move Windows DNS Server zones to another Windows DNS server

If you are looking to transfer an entier DNS Server including Active Directory settings and things like that, you may better use DNSDump.cmd script from here:

Just to migrate the zones, simply do following:

1. On the DNS server that is currently hosting the DNS zone(s), change any Active Directory-integrated zones to standard primary. This action creates the zone files that are needed for the destination DNS server.
2. Stop the DNS Server service on both DNS servers.
3. Manually copy the entire contents (subfolders included) of the %SystemRoot%\System32\DNS folder from the source server to the destination server.
4. On the current (old, source) DNS server, start Registry Editor (Regedit.exe).
5. Locate and click the following registry subkey: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\DNS\Zones
6. Export the Zones entry to a registry file.
7. Locate and click the following registry subkey: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\DNS Server\Zones
8. Export the Zones entry to a registry file.
9. On the destination (new) DNS server, double-click each registry file to import the Zones subkeys into the registry.
10. Bring the current DNS server down and transfer its IP address to the destination DNS server.
11. On the destination DNS server, start the DNS Server service. To initiate the registration of the server's A and PTR resource records, run the following command at a command prompt: ipconfig /registerdns
12. If this server is also a domain controller, stop and restart the Net Logon service to register the Service (SRV) records, or run the following command at a command prompt: netdiag /fix
13. The standard zones that were previously Active Directory-integrated can be converted back to Active Directory-integrated on the replacement DNS server if it is a domain controller.
14. Verify that the SOA resource records on each zone contains the correct name for the primary server and that the NS resource records for the zone(s) are correct.