swapip utility allows you to specify parameters from the command line in order to update nameserver records. This is useful, for example, if you moved an account from one server to another and did not use the Express Transfer option in WHM's Transfer Tool interface (WHM >> Home >> Transfers >> Transfer Tool).
swapip utility resides in the
To use this utility, run the following command:
/usr/local/cpanel/bin/swapip sourceip targetip ftpip domains
All of the parameters for the
The example above uses the following parameters:
|Example parameter||Input type||Description||Example|
|string||The old IP address.|
|string||The new IP address.|
|string||The new FTP server's IP address.|
|string||One or more domains that are associated with the old IP address. Space-separate multiple domain names.|
To change the nameserver records for the
example.com domain on the
127.0.0.0 IP address in order to point HTTP and FTP requests to the
126.96.36.199 IP address, run the following command:
/usr/local/cpanel/bin/swapip 127.0.0.0 188.8.131.52 184.108.40.206 example.com
swapip utility does not succeed, the output will resemble the following example:
root@example [~]# /usr/local/cpanel/bin/swapip 127.0.0.0 220.127.116.11 example.com Error: domains missing Usage: /usr/local/cpanel/bin/swapip sourceip destip ftpip domains...
swapip utility succeeds, the output will resemble the following example:
root@example [~]# /usr/local/cpanel/bin/swapip 127.0.0.0 18.104.22.168 22.214.171.124 example.com root@example [~]#
At this time, the error message may not give an accurate assessment of the error that occurrs.