[Pdns-users] FW: Deleted DNS Records not Removing from Slave
mark at streamservice.nl
Wed Jul 28 20:42:09 UTC 2010
I did forget to add the script, now it's attached. It is made to be used
from the command line interface (php pdns_clean.php).
With kind regards,
From: Mark Scholten [mailto:mark at streamservice.nl]
Sent: Wednesday, July 28, 2010 10:41 PM
To: 'pdns-users at mailman.powerdns.com'
Cc: 'fredj toukebri'
Subject: RE: [Pdns-users] Deleted DNS Records not Removing from Slave
Sorry for the delay, attached is a working file that tries to do a AXFR (so
you need to run it on a server that is allowed to receive AXFR from the
(hidden) master). It uses PHP and dig. It is tested on Debian (4 and 5)
At the top there is a small configuration part (database connection/test or
not/verbose or not).
The license is included at the top of the script (above the configuration
- Do the first run with $test = 1 and $verbose = 1 to see if it does work in
- Set $verbose = 0 if you want to use it in a cron (no output except if
there is a PHP/MySQL problem)
- I advise to do the first run with deleting zones without using a cron,
just to check it
Please contact me off list with improvements/problems. If someone wants to
include it with powerdns, feel free to include it (please respect the
With kind regards,
> -----Original Message-----
> From: pdns-users-bounces at mailman.powerdns.com [mailto:pdns-users-
> bounces at mailman.powerdns.com] On Behalf Of Mark Scholten
> Sent: Saturday, June 26, 2010 12:02 PM
> To: 'Nils Breunese (Lemonbit)'; pdns-users at mailman.powerdns.com
> Subject: Re: [Pdns-users] Deleted DNS Records not Removing from Slave
> > -----Original Message-----
> > From: pdns-users-bounces at mailman.powerdns.com [mailto:pdns-users-
> > bounces at mailman.powerdns.com] On Behalf Of Nils Breunese (Lemonbit)
> > Sent: Saturday, June 26, 2010 11:58 AM
> > To: pdns-users at mailman.powerdns.com
> > Subject: Re: [Pdns-users] Deleted DNS Records not Removing from Slave
> > Brandon Lee wrote:
> > > We have 2 PDNS servers using the MySQL backend. Both servers have
> > their own MySQL database. When inserting a DNS record, or making
> > changes the record is updated by the slave server. However, when a
> > record is deleted, the record is not being deleted from the slave
> > server. Is there some additional configuration option that must be
> > set, or is it not possible for the slave to delete records?
> > AFAIK you'll need to manually remove the zone from the slave if your
> > servers use independent database backends as I don't think there is a
> > way for the master to notify slaves of a removed zone. Please correct
> > me if I'm wrong.
> > You can solve this by setting up replication or sharing the database
> > that's possible in your situation. I have a server which is a slave
> > multiple supermasters, so I'm kind of stuck with the same problem
> > there.
> I did write a small PHP script for that. It checks the master (based on
> IP listed in the MySQL database used by the slave) to see if a zone
> exists. It records it when it doesn't get a response containing the SOA
> record (as I require the SOA record). It also records the reason (if
> for example a time out is different compared to an "I don't
> exist"/"recursion not allowed" response. After getting 3 times a
> saying the zone doesn't exist the zone is dropped on the slave. On
> request I
> can share that PHP script with the community (it works using a cron on
> daily base).
> > Nils.
> > _______________________________________________
> > Pdns-users mailing list
> > Pdns-users at mailman.powerdns.com
> > http://mailman.powerdns.com/mailman/listinfo/pdns-users
> Pdns-users mailing list
> Pdns-users at mailman.powerdns.com
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2233 bytes
Desc: not available
More information about the Pdns-users