• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

how to regenerate all DNS records after DNS template change

F

flupke

Guest
I changed he DNS template, I now would like PLESK to update all domains accordingly, can't find the way to do it.

Regards,

Flupke
 
You'll have to make the changes to existing domains yourself. If you're dealing with a lot of domains you probably want to script this or change it in the psa database directly (make backups beforehand!).
 
Try this one (it takes the domain names from the database and update the zone files):
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
 
Yes, that one-liner regenerates all zonefiles according to the info in the psa database, but it doesn't re-apply the DNS template to all domains and I believe that is what flupke wants.
 
I know this thread is sorta old, but I just ran into this while prepping all my domains for a migration. Using the DB Web Admin, issue a command like:

UPDATE `dns_zone` SET `ttl` = '300', `ttl_unit` = '60' WHERE `id` >1;

This query will change the TTL on all domains to 5 mins (300 seconds). If you need to change other things, I would recommend altering just one domain, and then looking in the DB to see what values that domain has, and mirroring it in the query. You can do this from command-line too, but I was already in the DB Web Admin when I wrote the query.

After that, run the command that Monica listed above to regenerate all the zone files.

Best of luck!
 
Back
Top