mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-12-27 10:12:16 +08:00
9817c284d7
* NEW: convertzone/ Read BIND zone files, output records as DSL, TSV, or pretty-print. * Refactored to be more gostyle. * Fix buffering issue. * Delete the hacky awk script. * Linting. |
||
---|---|---|
.. | ||
main.go | ||
README.md |
convertzone -- Converts a standard DNS zonefile into tsv, pretty, or DSL
convertzone converts an old-style DNS zone file into one of three formats:
- -mode=pretty Output the zone pretty-printed.
- -mode=tsv Output the zone recoreds as tab-separated values
- -mode=dsl Output the zone records as the DNSControl DSL language.
NOTE: mode=dsl is not perfect. The result is something you'll want to fine-tune. However it is better than manually converting big zones.
You must give the script both the zone name (i.e. "stackoverflow.com") and the filename of the zonefile to read.
Output is sent to stdout.
Example:
""" ./convertzone stackoverflow.com zone.stackoverflow.com >new/stackoverflow.com """
Caveats:
$INCLUDE
may not be handled correctly if you are not in the right directory.