I need to migrate all dns zone fron an old windows 2000/2003/2008 server to a new Windows 2008-R2/2012-R2 server. The servers are stand-alone and I cannot login on a same domain or from one to the other (no remote dnscmd command possible) ...and I have little time to complete the migration.
Start dumping all zones on the older server.
Create a compressed archive of the zone files and move it on the newer server.
Load all zones on the newer server.
To save all zones to disk:
for /f "usebackq delims= " %%i in (`dnscmd 127.0.0.1 /EnumZones ^| find "Secondary"`) do call :DOZONE %%i
dnscmd 127.0.0.1 /ZoneExport %1 %1.dns
To reload all zones from disk:
for /f "usebackq delims=|" %%f in (`dir /b "C:\Windows\System32\DNS" ^| findstr /i dns`) do call :DOZONE %%f
dnscmd 127.0.0.1 /ZoneAdd %_d% /Secondary 188.8.131.52 /file C:\Windows\System32\DNS\%_d%.dns
Here I'm migrating a Secondary DNS Server, if you need to migrate Primary DNS Zones you only need to substitute the strings 'Secondary' with 'Primary' (and remove the IP address after the word 'Secondary').
I also assume that you know how to move a zip file from a server to another (network, usb-drive, etc).