[Pdns-users] Duplicate SOA while using dig and zone2sql

Eugene Pefti eugenep at w3media.net
Tue Apr 22 21:23:30 UTC 2008


Can anybody tell me why this doesn't work:

#dig axfr domain.tld @xxx.xxx.xxx.xxx | zone2sql --gmysql --zone=- | mysql
-u root -D pdns

I do exactly what is said in pdns documentation, my problem is --zone=- is
not understood just because "-" option doesn't work. 

----------------------------------------------------------------------------
-
died because of STL error: Unable to open file '-': No such file or
directory
----------------------------------------------------------------------------
-

Eugene

-----Original Message-----
From: pdns-users-bounces at mailman.powerdns.com
[mailto:pdns-users-bounces at mailman.powerdns.com] On Behalf Of Eugene Pefti
Sent: Tuesday, April 22, 2008 10:59 AM
To: pdns-users at mailman.powerdns.com
Subject: RE: [Pdns-users] Duplicate SOA while using dig and zone2sql

Well, I don't have anything against artifacts of AXFR protocol but what
about improvements that were announced in conjunction with zone2sql that is
supposed to suppress duplicate SOA.

I'm quoting release notes from powerdns documentation:

======================================================================
Improvements: 

zone2sql can now accept - as a filename which causes it to read stdin. This
allows the following to work: dig axfr ds9a.nl | zone2sql --gmysql --zone=-
| mysql pdns, which is a nice way to import a zone. 

zone2sql now ignores duplicate SOA records which are identical - which also
makes the above possible.
======================================================================

Eugene


-----Original Message-----
From: bert hubert [mailto:bert.hubert at netherlabs.nl] 
Sent: Tuesday, April 22, 2008 10:50 AM
To: Eugene Pefti
Cc: pdns-users at mailman.powerdns.com
Subject: Re: [Pdns-users] Duplicate SOA while using dig and zone2sql

On Tue, Apr 22, 2008 at 10:36:40AM -0700, Eugene Pefti wrote:
> Hi folks,
> 
> I've just discovered one peculiar bug with dig utility while doing domains
> migration with zone2sql.
> If you run dig this way:
> # dig @nameserver domain.zone AXFR > zone.file 
> It produces two SOA records. Why is that ? Am I doing something wrong? Can
> anybody advise please?

'dig' emits two SOA records, which is an artefact of the AXFR protocol,
which terminates an AXFR with a final duplicate SOA record.

Not a lot can be done about this.

	Bert

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

_______________________________________________
Pdns-users mailing list
Pdns-users at mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users



More information about the Pdns-users mailing list