Re: Converting between zone file formats
On Mon, Jan 30, 2023 at 11:11:03AM +0100, Havard Eidnes via bind-users wrote: > You didn't answer, though, whether the 9.16 named-checkzone will > be able to read & correctly interpret the binary zone files 9.18 > stores in the file system, or whether there is some other and > more preferable way to accomplish what I want, either with 9.18 > itself or otherwise. It should, the raw file format hasn't changed. (There used to be a format called "map" that was incompatible between versions, but you're not using that, and it's been removed from BIND now anyway.) -- Evan Hunt -- e...@isc.org Internet Systems Consortium, Inc. -- Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: Converting between zone file formats
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 -- Константин Стефанов, Лаборатория параллельных информационных технологий НИВЦ МГУ -- Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: Converting between zone file formats
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. I've avoided this, on my slaves: zone "abundo.se" { masterfile-format text; }; I guess the binary format is more efficient, but for me this is not a problem. /AL -- Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: Converting between zone file formats
Hi Håvard. I currently have 9.18.8 installed; the version of named-compilezone is the same. As a test I just converted a text format zone file to raw and then that raw file back to text and it looks fine to me: - named-compilezone -f text -F raw -o junk.raw junk db.junk - named-compilezone -f raw -F text -o junk.raw.txt junk junk.raw Is that what you're after? Or is it specifically whether 9.18's interpretation of "raw" is different to 9.16's? (I don't know at the moment and I don't have a raw file generated with 9.16 to test it). Cheers, Greg On Mon, 30 Jan 2023 at 10:11, Havard Eidnes via bind-users < bind-users@lists.isc.org> wrote: > > Named-checkzone and named-compilezone are the same executable. > > Named-checkzone looks up remote records to more completely > > detect configuration errors. See the man page for details. > > Thanks for the hint, I apparently need to complicate my script > even more to avoid the network lookups. > > You didn't answer, though, whether the 9.16 named-checkzone will > be able to read & correctly interpret the binary zone files 9.18 > stores in the file system, or whether there is some other and > more preferable way to accomplish what I want, either with 9.18 > itself or otherwise. > > Regards, > > - Håvard > -- > Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe > from this list > > ISC funds the development of this software with paid support > subscriptions. Contact us at https://www.isc.org/contact/ for more > information. > > > bind-users mailing list > bind-users@lists.isc.org > https://lists.isc.org/mailman/listinfo/bind-users > -- Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: Converting between zone file formats
> Named-checkzone and named-compilezone are the same executable. > Named-checkzone looks up remote records to more completely > detect configuration errors. See the man page for details. Thanks for the hint, I apparently need to complicate my script even more to avoid the network lookups. You didn't answer, though, whether the 9.16 named-checkzone will be able to read & correctly interpret the binary zone files 9.18 stores in the file system, or whether there is some other and more preferable way to accomplish what I want, either with 9.18 itself or otherwise. Regards, - Håvard -- Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: Converting between zone file formats
Named-checkzone and named-compilezone are the same executable. Named-checkzone looks up remote records to more completely detect configuration errors. See the man page for details. -- Mark Andrews > On 30 Jan 2023, at 19: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 > -- > Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from > this list > > ISC funds the development of this software with paid support subscriptions. > Contact us at https://www.isc.org/contact/ for more information. > > > bind-users mailing list > bind-users@lists.isc.org > https://lists.isc.org/mailman/listinfo/bind-users -- Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users