Submitted by Locutus on Mon, 10/22/2012 - 15:07
It'd be very useful (and I guess very easy to implement) to have a function to re-transfer slave zone files, e.g. after changing the master server. Right now I have to manually do the "rndc retransfer" command in a shell.
Status:
Closed (fixed)
Comments
Submitted by JamieCameron on Mon, 10/22/2012 - 15:45 Comment #1
There is actually a link for this already in Webmin - in the BIND module, when you click on a slave zone, the "Apply Zone" link in the top-right forces a re-transfer.
Submitted by Locutus on Mon, 10/22/2012 - 16:37 Comment #2
Oh... Are you sure about that? I'm quite positive I tried that, after changing the master server IP address, and the contents of the slave hosts file stayed the same. Didn't check the syslog though, since I assumed the retransfer simply wasn't triggered.
Is it possible that the retransfer does nothing if the zone serial has not changed on the (new) master? Maybe, to really FORCE a retransfer, you'd have to delete the slave zone file and then do the retransfer.
Submitted by JamieCameron on Mon, 10/22/2012 - 16:39 Comment #3
If you changed the master IPs, you'd need to apply the whole BIND configuration with the "Apply Configuration" button.
Submitted by JamieCameron on Mon, 10/22/2012 - 17:20 Comment #4
Also, a re-transfer won't happen unless the serial number has changed - making record changes without updating the serial is a bad idea, as that's the only way BIND has to detect changes.
Submitted by Locutus on Tue, 10/23/2012 - 03:58 Comment #5
Yes, you're right... When doing "Apply configuration" and making sure the serial has increased on the new master, a retransfer is performed.
Thing is, it can happen that I migrate a server to a new master, using Virtualmin's Backup and Restore features. If I'm not mistaken, upon re-creating and restoring the virtual server on the new host, NS entries and SOA get changed to the new hostnames, but the serial is not updated (but rather taken from the backup). That's where I found that retransfer on the slave is not performed right away.
Submitted by JamieCameron on Tue, 10/23/2012 - 13:07 Comment #6
Actually, on a restore the SOA serial number should get incremented, for exactly this reason..
Submitted by Locutus on Tue, 10/23/2012 - 16:00 Comment #7
Okay, I'll take a closer look at this the next time I migrate a server. :) It's sure possible I did something in the wrong order when I tested this.
Thanks again, and issue closed, I shall re-open it if required!