We do something like the script below for out secondaries.  We store all zones in a database and have stored procedures that do all of the heavy lifting to create the zones on primary and secondary servers.  A wonderful time saver when migrating servers... run a cursor, or script, over the list of domain names and viola... two minutes later you have a complete nameserver.

Darin.
 
 
----- Original Message -----
Sent: Thursday, October 20, 2005 8:47 AM
Subject: RE: [Declude.JunkMail] OT: New DNS Server

I have done this in two ways.  You can export the registry and then use an editor that can handle line breaks and other control characters (such as MS Words) to massage the text file before reimporting it on the new server.
 
Or, you can create a list of domains (using the DNS command line tools) and then use a little .CMD procedure to create the secondary domain for all these domain names. Here is a sample batch script (mm.mm.mm.mm is the IP of your primary DNS server, nn.nn.nn.nn are the IP addresses of other subordinate DNS servers to which you permit zone transfers)
 
@ECHO OFF
if %1.==. goto error01
 
@ECHO ON
DNSCMD \\YOURSERVER /ZoneAdd %1 /Secondary mm.mm.mm.mm /file %1.dns
DNSCMD \\YOURSERVER /ZoneResetSecondaries %1 /SecureList nn.nn.nn.nn nn.nn.nn.nn
@ECHO OFF
 
:Done
GOTO :EOF
 
:error01
ECHO.
ECHO Missing Parameters!
ECHO.
ECHO Syntax:  CreateSecondary domainname
ECHO Example: CreateSecondary MyDomain.com
PAUSE Missing Parameters
GOTO :EOF
 
 
 

Best Regards
Andy Schmidt

Phone:  +1 201 934-3414 x20 (Business)
Fax:    +1 201 934-9206

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Evans Martin
Sent: Thursday, October 20, 2005 01:14 AM
To: Declude.JunkMail@declude.com
Subject: [Declude.JunkMail] OT: New DNS Server

I’m running Windows 2003 and MS DNS on my primary name server.  Now I need to slave another server to it.  What is the quickest way to transfer all of the domains from my old server to my new one and change them all from master to slave zones?

 

Thanks,

Evans Martin

 

---

Evans L. Martin
AIM:  martek01
http://www.martek.net

[EMAIL PROTECTED]
Fax:  615-523-1679
Mobile:  615-533-0197

 

Reply via email to