1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
|
.\" Man page generated from reStructuredText.
.
.TH "ZONE2SQL" "1" "Feb 06, 2021" "" "PowerDNS Authoritative Server"
.SH NAME
zone2sql \- convert BIND zones to SQL
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.SH SYNOPSIS
.sp
\fBzone2sql\fP {\fB\-\-named\-conf=\fP\fIPATH\fP,\fB\-\-zone\-file=\fP\fIPATH\fP [\fB\-\-zone\-name=\fP\fINAME\fP]} [\fIOptions\fP]
.SH DESCRIPTION
.sp
\fBzone2sql\fP parses BIND named.conf files and zonefiles and outputs SQL
on standard out, which can then be fed to your database.
.sp
\fBzone2sql\fP understands the BIND master file extension \fB$GENERATE\fP
and will also honour \fB$ORIGIN\fP and \fB$TTL\fP\&.
.sp
For backends supporting slave operation there is also an option to keep
slave zones as slaves, and not convert them to native operation.
.sp
\fBzone2sql\fP can generate SQL for the Generic MySQL, Generic PostgreSQL,
Generic SQLite3 backend.
.SH OPTIONS
.SH INPUT OPTIONS
.INDENT 0.0
.TP
.BI \-\-named\-conf\fB= <PATH>
Read \fIPATH\fP to get the BIND configuration
.TP
.BI \-\-zone\fB= <PATH>
Parse only the zone file at \fIPATH\fP Conflicts with \fB\-\-named\-conf\fP parameter.
.TP
.BI \-\-zone\-name\fB= <NAME>
When parsing a single zone without $ORIGIN statement, set \fIZONE\fP as
the zone name.
.UNINDENT
.SH BACKENDS
.INDENT 0.0
.TP
.B \-\-gmysql
Output in format suitable for the default configuration of the
Generic MySQL backend.
.TP
.B \-\-gpgsql
Output in format suitable for the default configuration of the
Generic PostgreSQL backend.
.TP
.B \-\-gsqlite
Output in format suitable for the default configuration of the
Generic SQLite3 backend.
.UNINDENT
.SH OUTPUT OPTIONS
.INDENT 0.0
.TP
.B \-\-json\-comments
Parse JSON in zonefile comments to set the \(aqdisabled\(aq and \(aqcomment\(aq
fields in the database. See \fIJSON COMMENTS\fP for more information.
.TP
.B \-\-transactions
If the target SQL backend supports transactions, wrap every domain
into a transaction for integrity and possibly higher speed.
.UNINDENT
.SH OTHER OPTIONS
.INDENT 0.0
.TP
.B \-\-filter\-duplicate\-soa
If there\(aqs more than one SOA record in the zone (possibly because it
was AXFR\(aqd), ignore it. If this option is not set, all SOA records
in the zone are emitted.
.TP
.B \-\-help
List all options
.TP
.B \-\-on\-error\-resume\-next
Ignore missing zone files during parsing. Dangerous.
.TP
.B \-\-slave
Maintain slave status of zones listed in named.conf as being slaves.
The default behaviour is to convert all zones to native operation.
.TP
.B \-\-verbose
Be verbose during conversion.
.UNINDENT
.SH JSON COMMENTS
.sp
The Generic SQL backends have the \(aqcomment\(aq and \(aqdisabled\(aq fields in the
\(aqrecords\(aq table. The \(aqcomment\(aq field contains a comment for this record
(if any) and the \(aqdisabled\(aq field tells PowerDNS if the record can be
served to clients.
.sp
When a zonefile contains a comment like
\fB; json={"comment": "Something", "disabled": true}\fP and
\fB\-\-json\-comments\fP is provided, the \(aqcomment\(aq field will contain
"Something" and the \(aqdisabled\(aq field will be set to the database\(aqs
native true value.
.sp
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.
.SH SEE ALSO
.sp
pdns_server(1)
.SH AUTHOR
PowerDNS.COM BV
.SH COPYRIGHT
2001-2019, PowerDNS.COM BV
.\" Generated by docutils manpage writer.
.
|