- Plesk for Linux
- Plesk for Windows
At the moment, multiple DNS A records for one or several domains in Domains > example.com > DNS Settings are set to IP address 203.0.113.2. How to automatically update all of them to the new IP address 203.0.113.3?
Connect to the server:
Create a backup of
# plesk db dump psa > psa_backup.sql
Note: additional information about backup creation can be found in this article.
Update the A records to a new IP address (in this example, 203.0.113.2 is the current IP address, and 203.0.113.3 is the new one - replace them with actual values):
For a specific domain, e.g. example.com:
# plesk db "update dns_recs set val='203.0.113.3', displayVal='203.0.113.3' where host like '%example.com%' and type='A' and displayVal='203.0.113.2';"
For all domains on the server:
# plesk db "update dns_recs set val='203.0.113.3', displayVal='203.0.113.3' where type='A' and displayVal='203.0.113.2';"
plesk repair dnsutility to update DNS configuration files:
# plesk repair dns -y