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 turgut@kalfaoglu.com.. thank you!
PS: The UPDATE adds ipv6 support. make sure to check it out.
Turgut Kalfaoglu
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 turgut@kalfaoglu.com.. thank you!
PS: The UPDATE adds ipv6 support. make sure to check it out.
Turgut Kalfaoglu