[Pdns-users] best way to persist a large hosts file

bert hubert bert.hubert at netherlabs.nl
Thu Dec 14 07:45:44 UTC 2006

On Mon, Dec 11, 2006 at 04:54:58PM +0000, matt farey wrote:
> Hi,
> I have half a million entries in a hosts file on my gateway, a
> workaround to prevent access to these sites while dns is loading.


Sorry for not getting back to you earlier!

> Can anyone please suggest a way I can persistently load these into a
> database so that each time the Pdns service restarts it doesn't have to
> parse a 12MB file! (which on my old machine takes 30 hour!)

Wow - let me tell you why ;-) You are running things in reverse, loading all
your authoritative data into the recursive server. This works, for people
who want to offer recursion and some quick authoritative zones. If you have
real amounts of DNS data, your best bet is to use the part of PowerDNS
designed for millions of domains: the authoritative server.

So install that, feed your zones to zone2sql, which converts them for
database use, and configure PowerDNS to connect to that database. Startup is
now instantaneous.

So, to reiterate, you are on the wrong end of PowerDNS!


http://www.PowerDNS.com      Open source, database driven DNS Software 
http://netherlabs.nl              Open and Closed source services

More information about the Pdns-users mailing list