ZONE2SQL(1) | PowerDNS Authoritative Server | ZONE2SQL(1) |
zone2sql - 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 out, 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 slave operation there is also an option to keep slave zones as slaves, 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
2001-2022, PowerDNS.COM BV
December 8, 2022 |