Convert a primary server named.conf to a secondary server

Barry Margolin barmar at
Fri Nov 12 20:22:16 UTC 1999

In article <19991112150922.A4542 at>,
Joseph S D Yao  <jsdy at> wrote:
>On Thu, Nov 11, 1999 at 10:42:07PM +0000, Barry Margolin wrote:
>> In article <kTGW3.409$75.265524 at>,
>> Adam Furman <afurman at> wrote:
>> >I would like to know if anyone knows of a script that convert a primary name
>> >server config file over to a secondary name server config file.  This way we
>> >only work on the primary and run this script with cron so the secondary will
>> >get the info.  Any help would be great.
>> awk '/type master;/ { print "type slave; masters {;};" } \
>>      !/type master;/ { print $0 };' master.named.conf > slave.named.conf
>Works fine if all zones are going to be slaved by exactly the same
>servers.  As you know, this is not necessarily going to be the case.
>Some options may need to change, too.

Based on the request, it seemed pretty likely that the first was true.  I
don't know what it would mean to convert a primary config file to a
secondary config file if there were other things to take into account.

As for other options, it should be pretty straightforward to add checks for
them to the above awk command.  Consider it a baseline from which he can
add all the bells and whistles he needs.

Barry Margolin, barmar at
GTE Internetworking, Powered by BBN, Burlington, MA
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

More information about the bind-users mailing list