NAME
zone2sql - Convert ISC Bind zones to SQL
SYNOPSIS
zone2sql [OPTIONS]
DESCRIPTION
Zone2sql parses Bind named.conf files and zonefiles and outputs SQL on
standard out, which can then be fed to your database.
zone2sql understands the Bind master file extension ’$GENERATE’ and
will also honour ’$ORIGIN’ and ’$TTL’.
For backends supporting slave operation (currently only the PostgreSQL
backend), there is also an option to keep slave zones as slaves, and
not convert them to native operation.
By default, zone2sql outputs code suitable for the mysqlbackend, but it
can also generate SQL for the Generic PostgreSQL and Oracle backends.
OPTIONS
Input options:
--named-conf=<filename>
Read <filename> to get the bind configuration
--zone=<zone-file>
Parse only this zone file. Conflicts with --named-conf
parameter.
--zone-name=<name>
When parsing a single zone without $ORIGIN statement, set this
as the zone name.
Output options:
--bare Output in a bare format, suitable for further parsing. The
output is formatted as follows:
domain_id<TAB>’qname’<TAB>’qtype’<TAB>’content’<TAB>prio<TAB>ttl
--gmysql
Output in format suitable for the default configuration of the
Generic MySQL backend.
--gpgsql
Output in format suitable for the default configuration of the
Generic PostgreSQL backend.
--mysql
Output in format suitable for the default configuration of the
MySQL backend (the default output format).
--oracle
Output in format suitable for the default configuration of the
Generic Oracle backend.
--startid=<id>
Use <id> as the forst domain_id generated (defaults to 0).
--transactions
For Oracle and PostgreSQL output, wrap each domain in a
transaction for higher speed and integrity.
Other options:
--slave
Maintain slave status of zones listed in named.conf as being
slaves. The default behaviour is to convert all zones to native
operation.
--on-error-resume-next
Ignore missing files during parsing. Dangerous.
--help List all options
--verbose
Be verbose during conversion.
SEE ALSO
pdns_server(8)