1ZONE2SQL(1)                    PowerDNS Recursor                   ZONE2SQL(1)
2
3
4

NAME

6       zone2sql -
7
8       zone2sql - convert BIND zones to SQL
9

SYNOPSIS

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

DESCRIPTION

15       zone2sql parses Bind named.conf files and zonefiles and outputs SQL  on
16       standard out, which can then be fed to your database.
17
18       zone2sql  understands the Bind master file extension $GENERATE and will
19       also honour $ORIGIN and $TTL.
20
21       For backends supporting slave operation there is also an option to keep
22       slave zones as slaves, and not convert them to native operation.
23
24       zone2sql  can  generate  SQL for the Generic MySQL, Generic PostgreSQL,
25       Generic SQLite3 and Generic Oracle backends.
26

OPTIONS

INPUT OPTIONS

29       --named-conf=<PATH>
30              Read PATH to get the bind configuration
31
32       --zone=<PATH>
33              Parse only the zone file at  PATH  Conflicts  with  --named-conf
34              parameter.
35
36       --zone-name=<NAME>
37              When  parsing  a single zone without $ORIGIN statement, set ZONE
38              as the zone name.
39

BACKENDS

41       --gmysql
42              Output in format suitable for the default configuration  of  the
43              Generic MySQL backend.
44
45       --gpgsql
46              Output  in  format suitable for the default configuration of the
47              Generic PostgreSQL backend.
48
49       --gsqlite
50              Output in format suitable for the default configuration  of  the
51              Generic SQLite3 backend.
52
53       --goracle
54              Output  in  format suitable for the default configuration of the
55              Generic Oracle backend.
56
57       --mydns
58              Output in a format suitable for the MyDNS backend.
59
60       --oracle
61              Output in format suitable for the default configuration  of  the
62              Oracle backend.
63

OUTPUT OPTIONS

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

OTHER OPTIONS

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

JSON COMMENTS

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

SEE ALSO

110       pdns_server(1)
111

AUTHOR

113       PowerDNS.COM BV
114
116       2001-2018, PowerDNS.COM BV
117
118
119
120
1214.1                              Mar 22, 2019                      ZONE2SQL(1)
Impressum