When accounts are too large to move with the WHM Transfers features, you can move the accounts manually. To do this, you must log in as the
This tutorial uses the following information:
Create a temporary directory with the mkdir command
To create a temporary directory, run the
This command does not produce output, but creates the
user-temp directory inside of the
Create a compressed backup of the public_html directory
Certain settings change how cPanel & WHM creates subdomain and addon domain directories. On some servers, these directories may not exist in the cPanel account's
public_html directory. For more information, read our Tweak Settings - Domains documentation.
Typically, most of an account's disk space usage occurs in its
public_html directory. If you create a compressed backup of the
public_html directory and omit it from the transfer process, you can reduce the size of the transfer.
To create a compressed backup, run the
- This command is an archive utility that compresses the archive when you give it the appropriate arguments.
- This results in a compressed archive of the
pubic_htmldirectory that the system creates in the
In the above command, the
tarutility receives four arguments (
cvzf) and two input variables (
|This argument creates a new archive. You must pass the |
This argument prints verbose information about the
This command does not require this argument, but it allows you to debug any errors.
|This argument uses the |
This argument causes the
In this example, the
Move public_html with the mv command
To move the
public_html directory to the temporary folder that you create, run the following
Never remove the
public_html directory before the transfer finishes. Maintain a copy of the
public_html directory throughout the transfer process, to ensure that you can restore the site if you encounter failures.
Create compressed backups of logs
Large websites usually generate large logs. To save transfer time and disk space, create a compressed backup of these logs. The
/usr/local/apache/domlogs directory stores the domain's Apache weblogs.
To create a compressed backup of the domain's weblogs and move the weblogs from the
/usr/local/apache/domlogs directory to the temporary directory, run the following two commands:
- The first command creates the compressed backup of the domain's weblogs in the
- The second command moves the existing weblog files to the temporary directory.
Manually transfer the compressed backups with the scp command
Several methods exist to transfer compressed backups after you create them. The secure copy (
scp) protocol transfers files between servers quickly and securely without the use of arguments.
To manually transfer compressed backups, run the
You must possess the username and password for the remote server, and specify a path for the files that you wish to copy on the remote server.
For example, to transfer compressed backups to the
/home/temp/ directory, run the following commands:
These two commands transfer the compressed backups that you create of the user's
public_html directory and Apache weblogs to the
/home/temp/ directory of the new server. The system will prompt you for the password when you connect to the new server. You can now use the WHM Transfer Tool interface to move the rest of the account information.
Some remote server configurations may require you to specify arguments to the
scpprotocol. The following table lists these arguments:
|This argument allows you to specify a port number. Specify the remote server if the remote server does not use the default SSH port (|
|This argument allows you to specify a key file if the remote server requires key-based authentication.|
|This argument causes the |
Extract the compressed backups
After you transfer the two compressed backups and finish the transfer of the account, extract the compressed backups to their appropriate locations. To extract the compressed backups to their appropriate locations, run the following command:
This command uses the
-x argument instead of the
-c argument. The
-x argument tells the
tar utility to extract information from the specified files.
To restore the user's
public_html directory to the
/home/user directory and extract the Apache logs to the
/usr/local/apache/domlogs directory, run the following two
When you run these two commands, you transfer and restore the backups that you created, and successfully move the account.