Child pages
  • The swapip Utility

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Include Page
LIB:_Version
LIB:_Version

Table of Contents
stylenone

Overview

The 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).

The swapip utility

The swapip utility resides in the /usr/local/cpanel/bin/swapip file.

To use this utility, run the following command:

Code Block
languagebash
/usr/local/cpanel/bin/swapip sourceip targetip ftpip domains

Parameters

Warning
titleImportant:

All of the parameters for the swapip utility are required .

The example above uses the following parameters:

Example parameterInput typeDescriptionExample
sourceipstringThe old IP address.127.0.0.0
targetipstringThe new IP address. 208.77.188.166
ftpipstringThe new FTP server's IP address.208.77.188.166
domainsstringOne or more domains that are associated with the old IP address. Space-separate multiple domain names.example.com

Example

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 208.77.188.166 IP address, run the following command:

Code Block
languagebash
/usr/local/cpanel/bin/swapip 127.0.0.0 208.77.188.166 208.77.188.166 example.com 

If the swapip utility does not succeed, the output will resemble the following example:

Code Block
languagebash
linenumberstrue
root@example [~]# /usr/local/cpanel/bin/swapip 127.0.0.0 208.77.188.166 example.com
Error: domains missing
Usage: /usr/local/cpanel/bin/swapip sourceip destip ftpip domains...

 

If the swapip utility succeeds, the output will resemble the following example:

Code Block
languagebash
linenumberstrue
root@example [~]# /usr/local/cpanel/bin/swapip 127.0.0.0 208.77.188.166 
208.77.188.166 example.com
root@example [~]#  


Note
titleNote:

At this time, the error message may not give an accurate assessment of the error that occurrs.

Additional documentation

Localtab Group


Localtab
activetrue
titleSuggested documentation

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("nameservers","ip") and label = "whm" and space = currentSpace()


Localtab
titleFor cPanel users

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("nameservers","ip") and label = "cpanel" and space = currentSpace()


Localtab
titleFor WHM users

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("nameservers","ip") and label = "whm" and space in (currentSpace(),"CKB")


Localtab
titleFor developers

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("nameservers","ip") and space = "DD"