Update Zone’s Serial

Filed Under (cPanel/WHM) by WebScHoLaR on 19-02-2008

Tagged Under : ,

A short bash command to update the serials for all the domains on the server. You can specify the new serial number and change the directory where the DNS zone files are present. I used this command when I performed bulk migrations.

for i in `ls /var/named/*.db` ; do cat $i | sed ‘s/[0-9]\{10\}/2008021901/g’ > $i.new; mv -f $i.new $i; chown named.named $i ;done

Leave a Reply

You must be logged in to post a comment.

Proudly Hosted by eServicesProvider