Knowledge Base ISC Main Website Ask a Question/Contact ISC
Converting Zone Files Between Text and Raw Formats
Author: Michael McNally Reference Number: AA-00608 Views: 27613 Created: 2012-01-25 01:32 Last Updated: 2012-01-25 01:36 100 Rating/ 1 Voters

With the development of the BIND 9.9 branch, zone file storage for slaved zones has been changed to expect the raw zone format by default.  BIND administrators testing 9.9 or preparing for migration from an earlier version have asked how to deal with this format change.  Several options are available.

Rename and Retransfer:  A BIND 9.9 slave server which encounters a zone file it cannot read (for example, because the contents are stored in a format other than what the server expects) will rename the unreadable zone file and attempt to retransfer the zone from the master.

Manual Conversion:  The named-compilezone utility, which is part of the BIND distribution, can be used to convert zones from text to raw and from raw to text.

# convert raw zone file "example.net.raw", containing data for zone example.net, to text-format zone file "example.net.text"
named-compilezone -f raw -F text -o example.net.text example.net example.net.raw

# convert text format zone file "example.net.text", containing data for zone example.net, to raw zone file "example.net.raw"
named-compilezone -f text -F raw -o example.net.raw example.net example.net.text



© 2001-2017 Internet Systems Consortium

For assistance with problems and questions for which you have not been able to find an answer in our Knowledge Base, we recommend searching our community mailing list archives and/or posting your question there (you will need to register there first for your posts to be accepted). The bind-users and the dhcp-users lists particularly have a long-standing and active membership.

ISC relies on the financial support of the community to fund the development of its open source software products. If you would like to support future product evolution and maintenance as well having peace of mind knowing that our team of experts are poised to provide you with individual technical assistance whenever you call upon them, then please consider our Professional Subscription Support services - details can be found on our main website.

Feedback 2
  • #
    [Michael McNally]: Re: Keeping zone files in text format 2013-08-14 20:26

    The configuration option "masterfile-format" (which is documented in the Administrator's Reference Manual) allows you to specify what format the zone data is stored in.

    You can use the usual scoping mechanisms to apply the value globally or on a zone-by-zone basis.

  • #
    [ tuserpe]: Keeping zone files in text format 2013-04-05 05:45

    How can I configure bind9.9 to keep using the text format for zone files? I need to upgrade to bind9.9 but I have more than 2700 zones files in 4 different views and the zones have been set up to include different files for the different views. I prefer my current set up.

Quick Jump Menu