• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

Command line - updating DNS-Records: Apply DNS Template Changes?

SchorschB

New Pleskian
Hi @all,

first of all, sorry for my bad english...

I've build my own DDNS-Service and after upgrading Plesk from version 11.5.30 to 12.0.18, Plesk says after DNS changes:
Warning: The DNS zone was modified. If you would like to apply DNS template changes to this zone, either click the 'Apply DNS Template Changes' button on this page or choose the 'Apply the changes to all zones' option in Server Administration Panel > Tools & Settings > DNS Template Settings > Apply DNS Template Changes.

Plesk also updates the timestamp on all records (at the same zone) in "dns_recs".

The script:
- /usr/local/psa/bin/dns --del geosweb.de -a __SUBDOMAIN__ -ip __OLD_IP__
- /usr/local/psa/bin/dns --add geosweb.de -a __SUBDOMAIN__ -ip __NEW_IP__

An "dns --del..." followed by an "dns --add..." works fine and fast (Nameserver update), but an update on the MySQL-Table followed by "dnsmng --update" takes a long time, until the nameserver be updated.

My question(s):
How can I perform a "Apply DNS Template Changes" by command line? Or what is the right way in Plesk, to update the IP on a A-Record?


Many thanks, besten Dank!
Schorsch
 
How can I perform a "Apply DNS Template Changes" by command line? Or what is the right way in Plesk, to update the IP on a A-Record?
Look at /usr/local/psa/bin/dns command with -res and -ip options. Use --help option for more detail.
 
Thank you IgorG. I tried this command and I have a problem.

My domains under a subscription.

subscriptiondomain.com
-> test2.com
-> test3.com

For test2.com or test3.com I add CNAME/A records via CLI. -> /usr/local/psa/bin/dns --add "test2.com" -cname sample -canonical "test2.com"

Now I run this command for applying DNS changes -> /usr/local/psa/bin/dns --reset test2.com -ip XXX.XXX.XXX.XXX

But deleting my custom records.

For every domains I add different custom records via CLI.

How can I resolve this issue?
 
Well, how can I apply custom dns records via cli?
With the same utility and options --add and:

-a '' or <subdomain-name> A resource record
-aaaa '' or <subdomain-name> AAAA resource record
-ns '' or <subdomain-name> NS resource record
-mx '' or <subdomain-name> MX resource record
-cname '' or <subdomain-name> CNAME resource record
-ptr '' or <subdomain-name> PTR resource record
-txt '' or <text> TXT resource record
-ip <ip> Specifies IP address for creating A
record or restoring the default
domain's DNS zone
 
I see following message in domain DNS settings page:

"Warning: The DNS zone was modified. If you would like to apply changes in the DNS template to this zone, either click the 'Apply DNS Template Changes' button on this page or go to the Server Administration Panel > Tools & Settings > DNS Template Settings > Apply DNS Template Changes and choose the 'Apply the changes to all zones' option."

But, working. Thank you IgorG.
 
Back
Top