Set Zone TTL - any way to differentiate SOA ad NS record TTL?

PeteS

Well-Known Member
Jun 8, 2017
303
66
78
Oregon
cPanel Access Level
Root Administrator
When using the Set Zone TTL feature it sets all to the TTL, but the initial cPanel default is for all to be 14400, except SOA and NA1/NS2 to be 86400. So in the case of shortening TTL for a migration, this is fine, but it is not possible to return them to their original values with manually edit each zone. On one hand this may not be a huge deal to have them all the same, but is seems like it should be possible to differentiate which records to set to what.

Anyone have more info on this? I couldn't find anything here or elsewhere.
 

PeteS

Well-Known Member
Jun 8, 2017
303
66
78
Oregon
cPanel Access Level
Root Administrator
Hey there! I don't have a way to differentiate the options within that particular tool. Could you make a feature request and I can run that by the developers?
I will do that and post the request back here.

I the mean time, how about a cli solution the finds all cases of a certain TTL in SOA and NS records and replaces them with another specified TTL value, either in a single domain.tld.db or *.db depending on the cli argument? I'm about to Google up an awk recipe for that, unless you think that's not a good plan. I figured to run it one server then re-sync the DNS cluster. Seems doable?
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
10,360
1,632
363
cPanel Access Level
Root Administrator
You totally could - I wouldn't be comfortable posting such a command on the forums just because then I'm going to get blamed when the DNS is messed up. You'd also need to update the serial numbers on all zones you adjust, and there are commands out there for that work. If the serials don't get incremented they won't sync to the cluster.
 

PeteS

Well-Known Member
Jun 8, 2017
303
66
78
Oregon
cPanel Access Level
Root Administrator
You totally could - I wouldn't be comfortable posting such a command on the forums just because then I'm going to get blamed when the DNS is messed up. You'd also need to update the serial numbers on all zones you adjust, and there are commands out there for that work. If the serials don't get incremented they won't sync to the cluster.
Oh, I get ya! ;) (I have a test server to play with and mess up...)

And thanks, I forgot about the serial number!
 
  • Like
Reactions: cPRex