zone2sql
convert BIND zones to SQL
- Provided by: pdns-server (Version: 5.0.2-1build1)
- Source: pdns
- Report a bug
convert BIND zones to SQL
zone2sql {--named-conf=PATH,--zone-file=PATH [--zone-name=NAME]} [Options]
zone2sql parses BIND named.conf files and zonefiles and outputs SQL on standard output, which can then be fed to your database.
zone2sql understands the BIND master file extension $GENERATE and will also honour $ORIGIN and $TTL.
For backends supporting secondary operation there is also an option to keep secondary zones as secondaries, and not convert them to native operation.
zone2sql can generate SQL for the Generic MySQL, Generic PostgreSQL, Generic SQLite3 backend.
The Generic SQL backends have the 'comment' and 'disabled' fields in the 'records' table. The 'comment' field contains a comment for this record (if any) and the 'disabled' field tells PowerDNS if the record can be served to clients.
When a zonefile contains a comment like ; json={"comment": "Something", "disabled": true} and --json-comments is provided, the 'comment' field will contain "Something" and the 'disabled' field will be set to the database's native true value.
WARNING: Using JSON comments to disable records means that the zone in PowerDNS is different from the one served by BIND, as BIND does not handle the disabled status in the comment.
PowerDNS.COM BV
PowerDNS.COM BV