Converting Zone Files Between Text and Raw Formats
With the development of the BIND 9.9 branch, zone file storage for secondary 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 secondary 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 primary.
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