So you’re migrating servers and you want to make sure that the TTL’s on your DNS zones are low so that DNS propagates quickly. Instead of changing all the TTL’s manually in Edit a DNS Zone in WHM, you can run a very simple script from SSH to change all TTLs from 14400 to 300 seconds.
From the command-line, run :
# cd /var/named
# sed -i 's/14400/300/g' *.db
This quick sed script assumes that the TTL’s are set to the default of 14400. Once it’s done, run
rndc reload