• 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
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.
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,791
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