7 :program:`zone2sql` {**--named-conf=**\ *PATH*,\ **--zone-file=**\ *PATH* [**--zone-name=**\ *NAME*]} [*Options*]
12 :program:`zone2sql` parses BIND named.conf files and zonefiles and outputs SQL
13 on standard out, which can then be fed to your database.
15 :program:`zone2sql` understands the BIND master file extension ``$GENERATE``
16 and will also honour ``$ORIGIN`` and ``$TTL``.
18 For backends supporting slave operation there is also an option to keep
19 slave zones as slaves, and not convert them to native operation.
21 :program:`zone2sql` can generate SQL for the Generic MySQL, Generic PostgreSQL,
22 Generic SQLite3 backend.
30 --named-conf=<PATH> Read *PATH* to get the BIND configuration
31 --zone=<PATH> Parse only the zone file at *PATH* Conflicts with **--named-conf** parameter.
32 --zone-name=<NAME> When parsing a single zone without $ORIGIN statement, set *ZONE* as
39 Output in format suitable for the default configuration of the
40 Generic MySQL backend.
42 Output in format suitable for the default configuration of the
43 Generic PostgreSQL backend.
45 Output in format suitable for the default configuration of the
46 Generic SQLite3 backend.
52 Parse JSON in zonefile comments to set the 'disabled' and 'comment'
53 fields in the database. See *JSON COMMENTS* for more information.
55 If the target SQL backend supports transactions, wrap every domain
56 into a transaction for integrity and possibly higher speed.
61 --filter-duplicate-soa
62 If there's more than one SOA record in the zone (possibly because it
63 was AXFR'd), ignore it. If this option is not set, all SOA records
64 in the zone are emitted.
67 --on-error-resume-next
68 Ignore missing zone files during parsing. Dangerous.
70 Maintain slave status of zones listed in named.conf as being slaves.
71 The default behaviour is to convert all zones to native operation.
73 Be verbose during conversion.
78 The Generic SQL backends have the 'comment' and 'disabled' fields in the
79 'records' table. The 'comment' field contains a comment for this record
80 (if any) and the 'disabled' field tells PowerDNS if the record can be
83 When a zonefile contains a comment like
84 ``; json={"comment": "Something", "disabled": true}`` and
85 **--json-comments** is provided, the 'comment' field will contain
86 "Something" and the 'disabled' field will be set to the database's
89 WARNING: Using JSON comments to disable records means that the zone in
90 PowerDNS is different from the one served by BIND, as BIND does not
91 handle the disabled status in the comment.