Converting between zone file formats
Konstantin Stefanov
cstef at parallel.ru
Mon Jan 30 11:37:28 UTC 2023
Hi,
I think you can achieve the same effect with dig, but it requires some
preparations.
First, enable zone transfers for your slave zone from 127.0.0.1: add
allow-transfer {127.0.0.1;}; to your slave zone definition (or add
127.0.0.1 there if you already have allow-transfer).
Then you can do dig from the same server:
dig @127.0.0.1 your.zone AXFR
Thus you'll get your slave zone in text format.
On 30.01.2023 10:33, Havard Eidnes via bind-users wrote:
> Hi,
>
> by default, the files written by BIND when acting as a slave is
> not in "text" format, but is some binary file format, I beleive
> what is referred to as "raw" format.
>
> Once in a while it's desireable to be able to see the contents of
> the slave zone file as plain text. To that end I have previously
> used named-compilezone to do this with
>
> named-compilezone \
> -q -j -f raw -F text -o - \
> $z \
> $directory/$z
>
> However... This does not appear to work anymore.
>
> Earlier I ran BIND 9.16 on this host, but it has been upgraded to
> 9.18 (built and installed from local source). It seems that a
> while back (probably in the 9.16 era), named-compilezone was
> changed to a symlink to named-checkzone, and it also looks like
> BIND 9.18 no longer installs named-checkzone, so what I have as
> named-checkzone appears to come from BIND 9.16.
>
> Trying to use the procedure as above results in a named-checkzone
> which hangs in select(), which is a bit strange when it's only
> supposed to act on local files?!?
>
> What should I now use instead of the above to convert the binary
> zone file to back to the textual master zone file format? Please
> don't say "that's not possible"...
>
> (This might be important to be able to do if an upstream suffers
> a catastrophe of some sort, as a step along the path to convert
> this name server to be a master for the zone in question. Being
> a master implies being able to modify the zone, and doing that
> with a binary file is ... slightly inconvenient.)
>
> Regards,
>
> - Håvard
--
Константин Стефанов,
Лаборатория параллельных информационных технологий НИВЦ МГУ
More information about the bind-users
mailing list