Hello, 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, Mark Scholten -----Original Message----- From: Mark Scholten [mailto:[email protected]] Sent: Wednesday, July 28, 2010 10:41 PM To: '[email protected]' Cc: 'fredj toukebri' Subject: RE: [Pdns-users] Deleted DNS Records not Removing from Slave Hello, 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) systems. 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 section). Tips: - Do the first run with $test = 1 and $verbose = 1 to see if it does work in your situation. - 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 license). With kind regards, Mark Scholten > -----Original Message----- > From: [email protected] [mailto:pdns-users- > [email protected]] On Behalf Of Mark Scholten > Sent: Saturday, June 26, 2010 12:02 PM > To: 'Nils Breunese (Lemonbit)'; [email protected] > Subject: Re: [Pdns-users] Deleted DNS Records not Removing from Slave > > > > > -----Original Message----- > > From: [email protected] [mailto:pdns-users- > > [email protected]] On Behalf Of Nils Breunese (Lemonbit) > > Sent: Saturday, June 26, 2010 11:58 AM > > To: [email protected] > > 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 > if > > that's possible in your situation. I have a server which is a slave > to > > 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 > the > IP listed in the MySQL database used by the slave) to see if a zone > still > 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 > known), > for example a time out is different compared to an "I don't > know"/"doesn't > exist"/"recursion not allowed" response. After getting 3 times a > response > 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 > a > daily base). > > Mark > > > > Nils. > > _______________________________________________ > > Pdns-users mailing list > > [email protected] > > http://mailman.powerdns.com/mailman/listinfo/pdns-users > > _______________________________________________ > Pdns-users mailing list > [email protected] > http://mailman.powerdns.com/mailman/listinfo/pdns-users
<<attachment: pdns_clean.php>>
_______________________________________________ Pdns-users mailing list [email protected] http://mailman.powerdns.com/mailman/listinfo/pdns-users
