Plesk TTL Reduction

Posted by alex almazan Mon, 17 Dec 2007 23:34:00 GMT

Provided is a means of reducing the Time to Live for Plesk DNS services

mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa
Then at the MySQL prompt enter:
INSERT INTO misc VALUES ('SOA_TTL','300');

That will make any new zones created have a TTL of 300. If you then want to re-write all your current DNS zones with the new TTL, you can run this command:

mysql -Ns -uadmin -p`cat /etc/psa/.psa.shadow` -D psa -e 'select name from domains' | awk '{print "/usr/local/psa/admin/sbin/dnsmng update " $1 }' | sh

This will take a few minutes to complete in most cases. Once complete, your domains will have a TTL of 300