edit domain.db manually - how to sync changes ?

4u123

Well-Known Member
PartnerNOC
Jan 2, 2006
939
22
168
I've had to make changes to a load of zone files manually - can you suggest how I would synchronise these changes to the cluster?
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
79
458
cPanel Access Level
Root Administrator
I've had to make changes to a load of zone files manually - can you suggest how I would synchronise these changes to the cluster?
Main >> DNS Functions >> Synchronize DNS Records

That will let you force a sync.
 

4u123

Well-Known Member
PartnerNOC
Jan 2, 2006
939
22
168
I'm not sure that will work.

Can you confirm that it will ignore the serial ? Wont it check for the newest records based on the serial and update all servers based on that ? Obviousley I need to be 100% sure of this.
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
79
458
cPanel Access Level
Root Administrator
You should update the serial when you make changes. It's a "best practice".
 

4u123

Well-Known Member
PartnerNOC
Jan 2, 2006
939
22
168
I had to update 100 zone files using replace because the nameservers were set incorrectly. I didnt manually edit each one.

Is there no way of doing this apart from editing each one individually ? Surely there must be!
 

WebScHoLaR

Well-Known Member
Dec 14, 2005
508
3
168
Planet Earth
You can use the replace to update the Nameservers and then update the serial for all the domains by running the following command. Just input the serial that you want to add:

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