dynamic zone file "style"

/dev/rob0 rob0 at gmx.co.uk
Wed Jul 8 20:07:40 UTC 2015

On Wed, Jul 08, 2015 at 05:38:59PM +0200,
   Stefan.Lasche at t-systems.com wrote:
> Mark Andrews:
> >> By default, the bind daemon uses the "relative" style (or 
> >> something similar) when writing dynamic zone files to disk.
> >> Guess what... all those "$ORIGIN" lines make it more difficult 
> >> to parse the f ile by a separate script... ;)
> > Truly, you don't wan't to be reading master files.  If you need 
> > the content of the zone transfer it from the server.  Doing that 
> > you will always get the latest content and don't have to worry 
> > about merging the journal etc.
> I understand your point. But for the script, I'll need the content 
> of all my zones in all views. Zone transfers won't be very 
> efficient for that.

I am not sure how you figure this.  I think a
    $ dig @ example.com axfr
will be far MORE efficient than a
    $ cat /path/to/zonefile/for/example.com

In the former you are writing/reading an UDP socket on localhost, 
receiving data which is in named's memory.  In the latter you are 
opening and reading from a file on disk, which, as noted by Mark, 
might not contain all the data you need.

> Until now I have experimented with the "-j" option from 
> named-compilezone to take care of the journals. Though, I'm not 
> sure this is much more efficient.

> Another option I evaluated was "rndc sync", but it isn't available 
> on bind 9.8

I suppose you know this already, but 9.8 is in EOL status.

> But your reply made me think of yet another solution. "rndc dumpdb 
> -zones" gives me the latest content of all zones of all views in a 
> single file. And, luckily, it uses the "full" style :) So this 
> should be fine for me.
> But before I try to re-invent the wheel:
> Does anyone know if there is already a parser for multiple 
> zone_files/zone_dumps/zone_transfers? I'm trying to filter all DNS 
> records that are related to a given host/ip?

  Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:

More information about the bind-users mailing list