DNS cluster

Peter Albrecht peter.albrecht at novell.com
Thu Jul 7 13:49:01 UTC 2005


Hi,

On Thursday 07 July 2005 15:12, Stephane Bortzmeyer wrote:
> On Thu, Jul 07, 2005 at 02:05:09PM +0100,
>  Stelios Asmargianakis <linux at climbincrete.com> wrote 
>  a message of 63 lines which said:
> 
> > Using rsync is not the problem and I can copy the zones easily 
> 
> Brad suggested to rsync named.conf, not the zone files.
> 
> > Regarding with Peter Alberchts reply (thanks for that) using webmin
> > or any other GUI is not the solution as I am trying to find
> > something to do the job automatic.

Sorry, I misunderstood the original post. :-(

> 
> The simplest solution is probably a short Python / Ruby / Haskell /
> whatever script.

If you put all your zones which should be transferred into a separate file and 
include this into /etc/named.conf using "include /etc/named.conf.include" you 
could create a bash script which uses sed:

1. Modify all entries from "master" to "slave":
  
   sed s/master/slave /etc/named.conf.include > /etc/named.conf.include.tmp

2. Modify the end of each zone definition by inserting the address of your 
   master server (I guess there's a much more elegant way, but at least this  
   works):

   sed s/\}\;/masters\{1.2.3.4\;\}\;\}\;/ /etc/named.conf.include.tmp > 
   /etc/named.conf.include

   This replaces the "};" at the end of your zone definitions with 
   "masters{1.2.3.4;};};". So the formatting gets lost, but I guess that is 
   tolerable.

I hope I didn't insert any typos ... ;-)

Regards,

Peter

-- 
Peter Albrecht, Novell, peter.albrecht at novell.com



More information about the bind-users mailing list