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 and Generic Oracle backends.
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
51       --goracle
52              Output  in  format suitable for the default configuration of the
53              Generic Oracle backend.
54
55       --mydns
56              Output in a format suitable for the MyDNS backend.
57
58       --oracle
59              Output in format suitable for the default configuration  of  the
60              Oracle backend.
61

OUTPUT OPTIONS

63       --json-comments
64              Parse  JSON in zonefile comments to set the 'disabled' and 'com‐
65              ment' fields in the database. See JSON COMMENTS for more  infor‐
66              mation.
67
68       --transactions
69              If  the  target  SQL  backend  supports transactions, wrap every
70              domain into a transaction  for  integrity  and  possibly  higher
71              speed.
72

OTHER OPTIONS

74       --filter-duplicate-soa
75              If  there's  more  than  one  SOA  record  in the zone (possibly
76              because it was AXFR'd), ignore it. If this option  is  not  set,
77              all SOA records in the zone are emitted.
78
79       --help List all options
80
81       --on-error-resume-next
82              Ignore missing zone files during parsing. Dangerous.
83
84       --slave
85              Maintain  slave  status  of  zones listed in named.conf as being
86              slaves.  The default behaviour is to convert all zones to native
87              operation.
88
89       --verbose
90              Be verbose during conversion.
91

JSON COMMENTS

93       The  Generic  SQL  backends have the 'comment' and 'disabled' fields in
94       the 'records' table. The 'comment' field contains a  comment  for  this
95       record  (if  any) and the 'disabled' field tells PowerDNS if the record
96       can be served to clients.
97
98       When a zonefile contains a comment like ; json={"comment": "Something",
99       "disabled":  true} and --json-comments is provided, the 'comment' field
100       will contain "Something" and the 'disabled' field will be  set  to  the
101       database's native true value.
102
103       WARNING:  Using JSON comments to disable records means that the zone in
104       PowerDNS is different from the one served by BIND,  as  BIND  does  not
105       handle the disabled status in the comment.
106

SEE ALSO

108       pdns_server(1)
109

AUTHOR

111       PowerDNS.COM BV
112
114       2001-2019, PowerDNS.COM BV
115
116
117
118
1194.2                              Nov 29, 2019                      ZONE2SQL(1)
Impressum