copy over ALL Zones

Bill Larson wllarso at swcp.com
Wed Jul 14 15:00:13 UTC 1999


In article <378DEFA8.A7924667 at gietl.com>,
Andreas Gietl  <gietl at gietl.com> wrote:
>Anybody know whether there is a possiblity to copy over
>automatically ALL ZONES from a primary and add them to the named.conf of
>a secondary or do i have to
>write a progie?

No, there is no way to automatically perform zone transfers for *ALL
ZONES* on a master server.  You will have to write a "progie" (I'm
assuming that you mean a "program").  But, you may not even want to do
this!

Just to expand upon what you are asking, "all" of the zones on any name
server will include a zone for the "0.0.127.in-addr.arpa" zone.  If you
were to have a mechanism to automatically transfer every primary zone
on a server, you would also be transfering this zone also, but every
name server is supposed to be primary for this zone.  So, how do you
configure your secondary?  As a primary for this zone, or as a
secondary?

Now, considering that it only takes one statement in your configuration
file, and the configuration file only needs to be modified when you add
or delete a zone, it doesn't seem to me to even be worthwhile to write
a program to automatically generate these secondary zone specification
lines for BIND.  Try using a simple text editor instead.

If you really have a large number of zones to configure for your
secondary, a simple shell, or perl, script should work quite well.
Once you have a copy of the config file for the master server, just
search for the "master" or "primary" zone specs and convert them to
"slave" or "secondary" zones with the IP address of the master zone
server added.  With the BIND-4.x syntax, a simple grep command could
find these.  With BIND-8, you will have to do a little more parsing of
the file, but not difficult.

Bill Larson (wllarso at swcp.com)


More information about the bind-users mailing list