- Plesk for Linux
How to apply the DNS Template to all existing domains on the server via the command-line interface?
Note: if you don't have root access to Plesk server via SSH, contact your hosting provider regarding the issue
Connect to the server via SSH.
Make a file with the list of all domains on the server:
cat /etc/psa/.psa.shadowmysql -u admin -Dpsa -N -e"SELECT name from domains" > domains.txt
Apply the DNS template to the domains from the list:
# cat domains.txt | while read i; do /usr/local/psa/bin/dns --reset $i -ip <IP_address>; done
Make sure to put the public IP address instead of
<IP_address>in the above command.