mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-01-08 16:38:21 +08:00
28 lines
811 B
Markdown
28 lines
811 B
Markdown
|
# 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.
|