Our features site is undergoing a refresh! Be sure to explore the revamped site and discover our latest product roadmap launching here on Monday, March 18th.
This object is in archive! 

Mass change to TTL for domains

ffeingol shared this idea 12 years ago
Completed

As a Server Administrator, I want the ability for the mass change to TTL for domains, so that I can prepare for massive DNS changes(eg migration).


Per this forum thread: http://forums.cpanel.net/f145/case-44619-mass-ttl-change-163133.html we really need a system to allow for mass TTL changes. We make various changes (server swaps, acquisitions where we need to lower the TTL's for 1,000's of zones. Some sort of system that will allow this (and then properly replicate through a cPanel DNS cluster) is needed.

Best Answer
photo

We have added this functionality both as a UI and a CLI script. Within the UI you have the ability to select multiple domains, the CLI version has quite a few more option (see help text in the codeblock below)


This is still a work in progress feature and has not had a QA pass yet, so please forgive any UI glitches or issue in the CLI help text.


Screenshots are attached of the workflow of the WHM UI.


  1. sh-4.1# bin/set_zone_ttl --help


    bin/set_zone_ttl: Command line tool to update the TTL values for specified DNS Zones.


    Usage:


    bin/set_zone_ttl


    You must specificy atleast one of the following options:

    --domain : Sets the TTL on all of the DNS records for a specific domain.

    --user : Sets the TTL on all of the domains belonging to a specific user.

    --reseller: Sets the TTL on all of the domain belonging to users owned by a specific reseller.

    --all : Sets the TTL on all of the domains on the server.


    Optional:


    --force : Bypass confirmation dialogs.

    --newttl: The new TTL value to use (Default: 3600).

    --nosync: Do NOT sync changes across the DNS cluster after the modifications are made.


    NOTE: If this switch is not specified, then the changes WILL be synced to all servers configured to "Synchronize Changes" in WHM's "DNS Cluster" interface.

Replies (6)

photo
1

This can be easily done using the API or by editing the zone files directly and triggering a sync afterwards. Dozens of example scripts are floating around on the net and forums. I agree this would be a "nice to have" but shouldn't be a priority at this point.

photo
1

WhiteDog wrote:

This can be easily done using the API or by editing the zone files directly and triggering a sync afterwards. Dozens of example scripts are floating around on the net and forums. I agree this would be a "nice to have" but shouldn't be a priority at this point.
especially that the scripts exist and is is such a simple taks for a script, it could have a simple tool in the admin area too

photo
1

We would have needed this feature in the next few weeks. We need this to prepare a copy with the express tranfer mode and all ttls need to be changed to 300 before the move and back to 14400 after the move.


This move will be doable with a sed command but in a year or so we will be doing one from a server in our dns cluster to another one in the same cluster. Not quite sure yet how I'm going to do this for just the dns zones of one of the servers.

photo
1

We have added this functionality both as a UI and a CLI script. Within the UI you have the ability to select multiple domains, the CLI version has quite a few more option (see help text in the codeblock below)


This is still a work in progress feature and has not had a QA pass yet, so please forgive any UI glitches or issue in the CLI help text.


Screenshots are attached of the workflow of the WHM UI.


  1. sh-4.1# bin/set_zone_ttl --help


    bin/set_zone_ttl: Command line tool to update the TTL values for specified DNS Zones.


    Usage:


    bin/set_zone_ttl


    You must specificy atleast one of the following options:

    --domain : Sets the TTL on all of the DNS records for a specific domain.

    --user : Sets the TTL on all of the domains belonging to a specific user.

    --reseller: Sets the TTL on all of the domain belonging to users owned by a specific reseller.

    --all : Sets the TTL on all of the domains on the server.


    Optional:


    --force : Bypass confirmation dialogs.

    --newttl: The new TTL value to use (Default: 3600).

    --nosync: Do NOT sync changes across the DNS cluster after the modifications are made.


    NOTE: If this switch is not specified, then the changes WILL be synced to all servers configured to "Synchronize Changes" in WHM's "DNS Cluster" interface.

photo
1

Just in time, I am migrating a server now and was looking for a way to change the TTLs back to normal, thx Cpanel!

photo
1

postcd wrote:

yes, please allow bulk TTL change of various records in DNS Zone file.


and other values, example i found my old server IP in SPF rule in DNS Zone files

Those are some great suggestions. This feature is already complete, and delivered in 11.46. If you could, please create a new request with your suggestions.

Replies have been locked on this page!