Synchronizing Name-servers
Bob Vance
bobvance at alumni.caltech.edu
Sat Jan 27 17:22:30 UTC 2001
I assume that you're talking about making your secondary "slave" for
each zone on the primary that's "primary".
Assume something like:
...
zone "vance" {
type master;
file ".pri/vance";
forwarders { }; /*20010123jrv*/
};
zone "1.168.192.in-addr.arpa" {
type master;
file ".pri/vance.192.168.1";
forwarders { }; /*20010123jrv*/
};
zone "dynamic.vance" in {
type master;
file ".pri/vance-dynamic";
allow-update { localhost; };
forwarders { }; /*20010123jrv*/
};
...
then a simple 'sed' will do it:
sed < /etc/named.conf \
-e 's/type.*master/type slave/' \
-e 's/file.*"\.pri\//file "\.sec\//' \
-e '/\.sec\//{a \
masters \{10.10.72.9 ; \};
}' \
> named.sec
This create a file "named.sec" and
. changes each "master" to "slave"
. changes each ".pri/" subdirectory filename to ".sec/" subdirectory
(of course, you may not have subdirectories and may have some
other way to distinguish secondary files from primary.
)
. adds a "masters" statement
Note that this will keep all other lines intact and you may need to
add additional changes or do them manually.
-------------------------------------------------
Tks | <mailto:BVance at sbm.com>
BV | <mailto:BobVance at alumni.caltech.edu>
Sr. Technical Consultant, SBM, A Gates/Arrow Co.
Vox 770-623-3430 11455 Lakefield Dr.
Fax 770-623-3429 Duluth, GA 30097-1511
=================================================
-----Original Message-----
From: bind-users-bounce at isc.org [mailto:bind-users-bounce at isc.org]On
Behalf Of Space Captain
Sent: Friday, January 26, 2001 8:18 PM
To: bind-users at isc.org
Subject: Synchronizing Name-servers
I am attempting to synchronize my primary and secondary named.conf
files. Does anyone know of a utility or have a script to do this?
Thanks!
Chris Wilson
Subsonic Online
More information about the bind-users
mailing list