• 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
Resource icon

Instruction A script to change the IP addresses of all hosts of a domain for migration 2.0

No permission to download
When migrating domains to a new server, you may need to change the IP addresses related to that domain at the SOURCE server. So that when the migration is done, the old server advertises the new IP of that domain.
PLESK doesn't do it by default, and it gets painful to do it manually.
This script learns the DNS entries of a domain, and makes changes only for PTR, TXT "spf1" and A records of that domain.

Usage: change-dns-records.rexx example.com 22.33.44.55 [OK]
where the 22.33.44.55 is the new IP address (the server you are migrating to).

If the script is used without the OK parameter, it only shows the commands, but does not execute it.
The script is written in ooRexx, and the ooRexx needs to be downloaded/installed from https://www.oorexx.org/download.html

If you need to do it for many domains, just put all the domains, one per line, in a file, and then run:
# cat domains | xargs -I '{}' change-dns-records.rexx '{}' 11.22.33.44 OK

Always make backups first!

PS: The scripts looks for the '-all' of the SPF record. If your ending SPF parameter is something else, change the script accordingly.

Please forward all suggestions to [email protected].. thank you!

PS: The UPDATE adds ipv6 support. make sure to check it out.

Turgut Kalfaoglu
Author
tkalfaoglu
Downloads
5
Views
115,072
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from tkalfaoglu

Latest updates

  1. change-DNS-records.rexx 2.0: Mass DNS record change tool - Added ipv6 support

    This tool updates domain DNS entries in PLESK in bulk. To use it, simply specify the domain...
Back
Top