1ZONE2SQL(1) PowerDNS Authoritative Server ZONE2SQL(1)
2
3
4
6 zone2sql - convert BIND zones to SQL
7
9 zone2sql {--named-conf=PATH,--zone-file=PATH [--zone-name=NAME]} [Op‐
10 tions]
11
13 zone2sql parses BIND named.conf files and zonefiles and outputs SQL on
14 standard out, which can then be fed to your database.
15
16 zone2sql understands the BIND master file extension $GENERATE and will
17 also honour $ORIGIN and $TTL.
18
19 For backends supporting slave operation there is also an option to keep
20 slave zones as slaves, and not convert them to native operation.
21
22 zone2sql can generate SQL for the Generic MySQL, Generic PostgreSQL,
23 Generic SQLite3 backend.
24
27 --named-conf=<PATH>
28 Read PATH to get the BIND configuration
29
30 --zone=<PATH>
31 Parse only the zone file at PATH Conflicts with --named-conf pa‐
32 rameter.
33
34 --zone-name=<NAME>
35 When parsing a single zone without $ORIGIN statement, set ZONE
36 as the zone name.
37
39 --gmysql
40 Output in format suitable for the default configuration of the
41 Generic MySQL backend.
42
43 --gpgsql
44 Output in format suitable for the default configuration of the
45 Generic PostgreSQL backend.
46
47 --gsqlite
48 Output in format suitable for the default configuration of the
49 Generic SQLite3 backend.
50
52 --json-comments
53 Parse JSON in zonefile comments to set the 'disabled' and 'com‐
54 ment' fields in the database. See JSON COMMENTS for more infor‐
55 mation.
56
57 --transactions
58 If the target SQL backend supports transactions, wrap every do‐
59 main into a transaction for integrity and possibly higher speed.
60
62 --filter-duplicate-soa
63 If there's more than one SOA record in the zone (possibly be‐
64 cause it was AXFR'd), ignore it. If this option is not set, all
65 SOA records in the zone are emitted.
66
67 --help List all options
68
69 --on-error-resume-next
70 Ignore missing zone files during parsing. Dangerous.
71
72 --slave
73 Maintain slave status of zones listed in named.conf as being
74 slaves. The default behaviour is to convert all zones to native
75 operation.
76
77 --verbose
78 Be verbose during conversion.
79
81 The Generic SQL backends have the 'comment' and 'disabled' fields in
82 the 'records' table. The 'comment' field contains a comment for this
83 record (if any) and the 'disabled' field tells PowerDNS if the record
84 can be served to clients.
85
86 When a zonefile contains a comment like ; json={"comment": "Something",
87 "disabled": true} and --json-comments is provided, the 'comment' field
88 will contain "Something" and the 'disabled' field will be set to the
89 database's native true value.
90
91 WARNING: Using JSON comments to disable records means that the zone in
92 PowerDNS is different from the one served by BIND, as BIND does not
93 handle the disabled status in the comment.
94
96 pdns_server(1)
97
99 PowerDNS.COM BV
100
102 2001-2023, PowerDNS.COM BV
103
104
105
106
107 Oct 05, 2023 ZONE2SQL(1)