after a dns zone do you need to update the serial number? and if so how do you do that?
after a dns zone do you need to update the serial number? and if so how do you do that?
If you're editing it in WHM, it'll increment the serial number automatically. If you're editing it by hand for some reason, just increment the serial number by hand as well.
for a given file domain.com.db how do you do this?
maybe via the command line?
i need to do it for a couple hundred domains
The format of the zone files should be predictable, so you should be able to write a script to edit them all. There isn't an easy, ready-made way of doing it as far as I know.
The other way would be to edit each file with vim, emacs, nano, whatever. That would obviously be pretty time consuming though.
Hello
This could be achieved using a Perl command like the one posted below. Please notice that /var/named is backed up before running this command so it can be restored if any errors occur:i need to do it for a couple hundred domains
This will increment the serial for all DNS zones within the /var/named directory.Code:# cp -a /var/named /var/named-backup # find /var/named/*.db -mtime -1 -exec perl -pi -e 'if (/^\s+(\d{10})\s+;\s+serial/i) { my $i = $1+1; s/$1/$i/;}' '{}' \;
Thank you.
cPResources: Support Options - Submit a ticket here - Additional Support Options - Forums Search - Mailing Lists - Documentation - Migration Services
-- cPanelMichael - Migration Specialist, Technical Analyst, cPanel Technical Support