Home > Server Administration > Bulk DNS updates with Plesk/Windows

Bulk DNS updates with Plesk/Windows

So we ran into a situation where a dedicated mail server needed to be migrated. For reasons I won’t get into, we were not able to migrate the main IP of the server to the new machine. We were, however, offered the option of migrating the secondary IPs. However, we had about 200 domains with their MX records pointed to the main IP of the server.

The websites are run on a Plesk/Windows server with an external mail server. The DNS is controlled by Plesk.

After some brainstorming, we decided to try to interact directly with the Plesk database to change these entries all at once. We found that the Plesk database handler was MySQL which made this project a lot easier. You can verify this by following the advice here:

http://kb.parallels.com/en/3453

First, following the advice of this article, we established a connection to the database:

http://kb.parallels.com/en/3472

Then we use some standard MySQL queries to update the database:

UPDATE dns_recs SET val=”1.2.3.4″ WHERE val=”5.6.7.8″;

UPDATE dns_recs SET displayval=”1.2.3.4″ WHERE displayval=”5.6.7.8″;

So, basically, there are two data fields that have to be updated. The val field and the displayval field. This changes all instances of 5.6.7.8 to 1.2.3.4 in all the dns records.

Once this is done, run this command:

%plesk_bin%/dnsmng.exe update *

This will force plesk to re-read the database for all the DNS records and regenerate the dns zone files.

Categories: Server Administration Tags:
  1. No comments yet.
  1. No trackbacks yet.
You must be logged in to post a comment.

site tracking with Asynchronous Google Analytics plugin for Multisite by WordPress Expert at Web Design Jakarta.