Index: [Article Count Order] [Thread]

Date:  Thu, 8 Oct 2009 03:36:52 +0200
From:  Michael Stauber <bq (at mark) solarspeed.net>
Subject:  [coba-e:16081] Re: Copy Secondary DNS to different BQ machine
To:  coba-e (at mark) bluequartz.org
Message-Id:  <200910080336.53857.bq (at mark) solarspeed.net>
In-Reply-To:  <4ACCBE56.12860.FE8B7B9@localhost>
References:  <4ACCBE56.12860.FE8B7B9@localhost>
X-Mail-Count: 16081

Hi Martyn,

> I'm not adding 400+ domains manually, though!

Here is a quick "hack" for this:

I have two scripts for this purpose. One polls CODB and prints out all 2ndary 
DNS records onto the screen in a format that makes it easy to work with the 
data. If that output is redirected to a file, that file can be copied to 
another box where you can import the 2ndary DBS records with another script.

How to use it:

wget http://data.smd.net/scripts/dns-slaves/dns-slavezones.pl.txt
mv dns-slavezones.pl.txt dns-slavezones.pl
wget http://data.smd.net/scripts/dns-slaves/dns-import-slavezones.pl.txt
mv dns-import-slavezones.pl.txt dns-import-slavezones.pl
chmod 755 dns-slavezones.pl
chmod 755 dns-import-slavezones.pl

That downloads two helper scripts and makes them executeable.

On the server that has the 2ndary DNS records in CODB run this script:

./dns-slavezones.pl > slaves.txt

Copy the slaves.txt to the "new" box where you want to import the 2ndary DNS 
records.

Copy the "slaves.txt" into the same directory where you also uploaded the 
executeable "dns-import-slavezones.pl" script.

Then run that script there:

./dns-import-slavezones.pl

That will import the 2ndary DNS records back into CODB and will create the 
respective zone files. Afterwards check in the GUI if all the zones show up. 
They should.

These are quick and dirty scripts that I recently created "on the fly". The 
dnsImport script on BlueOnyx once had the functionality to import 2ndary 
records, but it wasn't working entirely right under some circumstances. Hence 
I'm currently doing a major overhaul of the dnsImport scripts, but it's far 
from being finished.

-- 
With best regards,

Michael Stauber