1ZONE2SQL(1)              PowerDNS Authoritative Server             ZONE2SQL(1)
2
3
4

NAME

6       zone2sql - convert BIND zones to SQL
7

SYNOPSIS

9       zone2sql     {--named-conf=PATH,--zone-file=PATH    [--zone-name=NAME]}
10       [Options]
11

DESCRIPTION

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

OPTIONS

INPUT OPTIONS

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
32              parameter.
33
34       --zone-name=<NAME>
35              When  parsing  a single zone without $ORIGIN statement, set ZONE
36              as the zone name.
37

BACKENDS

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

OUTPUT OPTIONS

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
59              domain into a transaction  for  integrity  and  possibly  higher
60              speed.
61

OTHER OPTIONS

63       --filter-duplicate-soa
64              If  there's  more  than  one  SOA  record  in the zone (possibly
65              because it was AXFR'd), ignore it. If this option  is  not  set,
66              all SOA records in the zone are emitted.
67
68       --help List all options
69
70       --on-error-resume-next
71              Ignore missing zone files during parsing. Dangerous.
72
73       --slave
74              Maintain  slave  status  of  zones listed in named.conf as being
75              slaves.  The default behaviour is to convert all zones to native
76              operation.
77
78       --verbose
79              Be verbose during conversion.
80

JSON COMMENTS

82       The  Generic  SQL  backends have the 'comment' and 'disabled' fields in
83       the 'records' table. The 'comment' field contains a  comment  for  this
84       record  (if  any) and the 'disabled' field tells PowerDNS if the record
85       can be served to clients.
86
87       When a zonefile contains a comment like ; json={"comment": "Something",
88       "disabled":  true} and --json-comments is provided, the 'comment' field
89       will contain "Something" and the 'disabled' field will be  set  to  the
90       database's native true value.
91
92       WARNING:  Using JSON comments to disable records means that the zone in
93       PowerDNS is different from the one served by BIND,  as  BIND  does  not
94       handle the disabled status in the comment.
95

SEE ALSO

97       pdns_server(1)
98

AUTHOR

100       PowerDNS.COM BV
101
103       2001-2019, PowerDNS.COM BV
104
105
106
107
108                                 Apr 06, 2020                      ZONE2SQL(1)
Impressum