• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

change NS for multiple domains

Darko Bazulj

Basic Pleskian
what is good way to modify NS records for multiple domains except doing that over panel manually?

Should I modify dns_recs table and then run
DNSMng.exe UPDATE domain.tld

Anyone have some example or have suggestion?
 
I modified all NS records

Example if someone find it usefull.

run on command prompt

"%plesk_dir%\MySQL\bin\mysql.exe" -uadmin -p*** -P 8306 psa -sNe "select id from dns_recs where type='ns' and val='ns2.wrong.com.';" > "C:\domains_list_wrong-id2.txt"

create script set-ns.bat and put next in and run

@echo off

for /f "tokens=*" %%a in (C:\domains_list_wrong-id2.txt) do (
"%plesk_dir%\MySQL\bin\mysql.exe" -uadmin -p*** -P 8306 psa -sNe "update dns_recs set val='ns2.ok.com.', displayVal='ns2.ok.com.' where id='%%a';"

)

run on command prompt

"%plesk_dir%\admin\bin\DNSMng.exe" UPDATE *
 
Back
Top