• 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.

How to DNS Template Apply all domains single command

ghacvbbngff

New Pleskian
Hi, I have more than 100 domains on my vps server and I want to change all of them new dns template that I fixed new nameservers. How can I do that?

Thanks.
 
Try to use following method:

1. Remove old NS record from all domain's DNS zones:

# for i in `mysql -uadmin -p\`cat /etc/psa/.psa.shadow\` psa -Ns -e "select name from domains"`; do /usr/local/psa/bin/dns --del $i -ns '' -nameserver ns2.test.tld; done


2. Add new NS record for all domains:

# for i in `mysql -uadmin -p\`cat /etc/psa/.psa.shadow\` psa -Ns -e "select name from domains"`; do /usr/local/psa/bin/dns --add $i -ns '' -nameserver ns.test.tld; done

3. Update and reload new zones:
# # for i in `mysql -uadmin -p\`cat /etc/psa/.psa.shadow\` psa -Ns -e "select name from domains"`; do /usr/local/psa/admin/sbin/dnsmng -update $i; done

Note, it is just example. Modify it as you need.
 
Back
Top