<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >Migrating to PDNS</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" TITLE="PowerDNS manual" HREF="index.html"><LINK REL="PREVIOUS" TITLE="Performance related settings" HREF="performance-settings.html"><LINK REL="NEXT" TITLE="Recursion" HREF="recursion.html"></HEAD ><BODY CLASS="CHAPTER" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PowerDNS manual</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="performance-settings.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="recursion.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="CHAPTER" ><H1 ><A NAME="MIGRATION" ></A >Chapter 10. Migrating to PDNS</H1 ><P > Before migrating to PDNS a few things should be considered. <P ></P ><DIV CLASS="VARIABLELIST" ><DL ><DT >PDNS does not operate as a 'slave' or 'master' server with all backends</DT ><DD ><P > Only the Generic SQL, OpenDBX and BIND backends have the ability to act as master or slave. </P ></DD ></DL ></DIV > To migrate, the <B CLASS="COMMAND" >zone2sql</B > tool is provided. </P ><P > Additionally, the PowerDNS source comes with a number of diagnostic tools, which can be helpful in verifying proper PowerDNS operation, versus incumbent nameservers. See <A HREF="analysis.html" >Chapter 19</A > for more details. </P ><DIV CLASS="SECT1" ><H1 CLASS="SECT1" ><A NAME="ZONE2SQL" >10.1. Zone2sql</A ></H1 ><P > Zone2sql parses Bind named.conf files and zonefiles and outputs SQL on standard out, which can then be fed to your database. </P ><P > Zone2sql understands the Bind master file extension '$GENERATE' and will also honour '$ORIGIN' and '$TTL'. </P ><P > For backends supporting slave operation (currently only the Generic PostgreSQL, Generic MySQL and BIND backend), there is also an option to keep slave zones as slaves, and not convert them to native operation. </P ><P > By default, zone2sql outputs code suitable for the mysqlbackend, but it can also generate SQL for the Generic PostgreSQL, Generic MySQL and Oracle backends. The following commands are available: </P ><P > <P ></P ><DIV CLASS="VARIABLELIST" ><DL ><DT >--bare</DT ><DD ><P > Output in a bare format, suitable for further parsing. The output is formatted as follows: <PRE CLASS="SCREEN" > domain_id<TAB>'qname'<TAB>'qtype'<TAB>'content'<TAB>prio<TAB>ttl </PRE > </P ></DD ><DT >--gmysql</DT ><DD ><P > Output in format suitable for the default configuration of the Generic MySQL backend. </P ></DD ><DT >--gpgsql</DT ><DD ><P > Output in format suitable for the default configuration of the Generic PostgreSQL backend. </P ></DD ><DT >--help</DT ><DD ><P > List options. </P ></DD ><DT >--mysql</DT ><DD ><P > Output in format suitable for the default configuration of the MySQL backend. Default. </P ></DD ><DT >--named-conf=...</DT ><DD ><P > Parse this named.conf to find locations of zones. </P ></DD ><DT >--on-error-resume-next</DT ><DD ><P > Ignore missing files during parsing. Dangerous. </P ></DD ><DT >--oracle</DT ><DD ><P > Output in format suitable for the default configuration of the Generic Oracle backend. </P ></DD ><DT >--slave</DT ><DD ><P > Maintain slave status of zones listed in named.conf as being slaves. The default behaviour is to convert all zones to native operation. </P ></DD ><DT >--startid</DT ><DD ><P > Supply a value for the first domain_id generated. Defaults at 0. </P ></DD ><DT >--transactions</DT ><DD ><P > For Oracle and PostgreSQL output, wrap each domain in a transaction for higher speed and integrity. </P ></DD ><DT >--verbose</DT ><DD ><P > Be verbose during conversion. </P ></DD ><DT >--zone=...</DT ><DD ><P > Parse only this zone file. Conflicts with <B CLASS="COMMAND" >--named-conf</B > parameter. </P ></DD ><DT >--zone-name=...</DT ><DD ><P > When parsing a single zone without $ORIGIN statement, set this as the zone name. </P ></DD ></DL ></DIV > </P ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="performance-settings.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="recursion.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >Performance related settings</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" > </TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Recursion</TD ></TR ></TABLE ></DIV ></BODY ></HTML >