Results 1 to 3 of 3

Thread: Change TTL on multiple DNS Zones?

  1. #1
    Registered Member
    Join Date
    Feb 2003
    Posts
    191

    Default Change TTL on multiple DNS Zones?

    Some time ago I changed a lot of DNS Zones to use a very short TTL during a site moving process. This allowed me to move a lot of sites without any downtime. Problem is, as a hangover from this I now have a whole lot of sites still using a very short TTL. Does anybody have a sure-fire way to reset everything back to the standard TTL of 14400 without risk?

  2. #2
    Registered Member viraj's Avatar
    Join Date
    Sep 2006
    Location
    India
    Posts
    209
    cPanel Access Level

    DataCenter Provider

    Red face

    Hi,

    You can mass replace the TTL entries within all of your zone files by using this syntax :

    [root@support ~]# cd /var/named/

    [root@support named]# replace "$TTL xxxxx" "$TTL 14400" -- *.db
    where "$TTL xxxxx" is your current setup TTL.

  3. #3
    Registered Member
    Join Date
    Feb 2003
    Posts
    191

    Default

    Sorry, I should have been more specific.

    I am trying to change the TTL for pretty much every zone and every record within the zone on an entire server i.e. everything that should have been set to 14400 ("www" A record for example) has been set to low TTL times like 60. The problem with doing a simple 'replace' for everything in that instance comes when a client has a subdomain, domain or IP address in their zone containing "60" for example.

    I'd imagine my best bet is to use DNS::ZoneParse to read and update every zone file, but I was hopeful there was existing code available somewhere. I may just have to code up something myself though.

Similar Threads

  1. Change DNS Editor New Entries TTL
    By trizzo in forum Bind / DNS / Nameserver Issues
    Replies: 1
    Last Post: 09-05-2011, 11:31 AM
  2. Change multiple DNS zones
    By ruber in forum Bind / DNS / Nameserver Issues
    Replies: 2
    Last Post: 07-06-2007, 09:12 AM
  3. Script to change TTL values for existing zones .. ??
    By qwerty in forum General Discussion
    Replies: 1
    Last Post: 04-02-2006, 10:17 AM
  4. Possible to edit multiple DNS zones
    By andrewm in forum Bind / DNS / Nameserver Issues
    Replies: 8
    Last Post: 11-23-2005, 11:21 AM
  5. dns zone template , which one to change TTL?
    By gundamz in forum Bind / DNS / Nameserver Issues
    Replies: 4
    Last Post: 08-23-2005, 03:46 AM
bargain