Posted by Matthew Jeffels, Last modified by Matthew Jeffels on 09 November 2016 02:04 PM
This interface allows you to copy accounts from a remote server to your cPanel & WHM server.
In order to transfer accounts you will need to obtain the following;
SSH access to the remote server.
Please be aware; The Transfer Tool feature requires MySQL or a MySQL-compatible database on the target server in order to function properly. If you experience problems with session timeouts, you can increase the number of seconds in the "Number of seconds an SSH connection related to an account transfer may be inactive before timing out" which is found in System section of WHM's Tweak Settings interface.
Warning; Do not shut down or restart any of the processes on either server during the transfer and restoration process.
Important note about account transfers from Plesk
In order to transfer an accounts from Plesk, you will first need to change any forwarded domains to physical hosting accounts.
To do this, you will need to run the following command as a root user; /usr/local/psa/bin/domain --update example.com -hst_type phys -login "example" -hosting true -ip 127.0.0.1 -passwd "12345luggage"
"example.com" - this represents the forwarding domain.
If you need to convert several forwarding domains into hosting accounts, you can open a support ticket with them and their migration team will aid you.
How to transfer and restore multiple accounts
The "Transfer Tool" interface allows you to specify information about the server from which to transfer accounts. You will need to enter the following in order to begin a transfer;
Remote server information
In the "Remote Server Address" textbox, you will need to enter the IP address or a Fully Qualified Domain Name (FQDN).
In this section of the interface you need to specify the authentication method with which to log in to the remote server. In order to do this you will need to select from the following;
First select whether to log in as the "root" user or with a specific username. Please be aware that if the "PermitRootLogin" value is set to "no" in the "sshd_config" file on the remote server, you will have to log in as a user other than the root user and then escalate to the root user.
If you selected "User" under "Login", you will need to enter the following;
Enter the remote account's username in the Username textbox.
Use the Authentication Method menu to specify whether to use a password or an SSH public key to authenticate to the remote server. If you select Password, enter the password for the account in the Passwordtextbox. If you select SSH Public Key, select the key to use during authentication. Make certain that you installed the appropriate key in WHM's Manage root's SSH Keys interface.
Note: If you encrypted your account's SSH public key, enter the SSH Key Passphrase. If you select User under Login, select a root escalation method under the Root Escalation Method heading. If you select su for the Root Escalation Method, enter the root password in the Root Password textbox.
This section of the interface allows you to select whether to use the Restricted Restore feature or copy the reseller privileges.
The Restricted Restore feature allows you to performs additional security checks on the backup file in order to mitigate the risk of transfers from unfamiliar sources. If an issue exists with component of the backup file (for instance, a MySQL grant table is compromised or a symbolic link attack), the system will not restore that portion of the backup and will add a warning to the log file. The Restricted Restore feature is experimental. Do not consider it an effective security control at this time. The behavior of this feature may change in a future release of cPanel & WHM. Exercise extreme caution when you use this feature. If you do not trust the source of the account backup with root access to your server, use the Restricted Restore feature to protect your server. If you wish to use the Restricted Restore feature to restore an account that owns PostgreSQL® databases, the target server must use PostgreSQL version 8.4 or newer.
The Restricted Restore feature only allows restored accounts to use noshell or jailshell. If the restored account uses another shell, the system sets the account to use noshell.
This section allows you to select advanced options for the transfer. Click "Show" to display the list of options.
In order to select the advanced options, perform the following;
From the Remote Server Type menu, select the web control panel that the remote server runs. Choose from the following options:
Select the "Unencrypted" option to use an unencrypted session to transfer the files.
Select the "Compressed Transfers" option in order to compress the files during the rsync process when the remote server transfers the files.
Select the "Low Priority" option to use less CPU and input/output (I/O) on the remote server. This option reduces the impact on performance on the remote server, but increases the duration of the transfer session.
Select the "Use Incremental Backups speed-up" option to decrease the amount of time that the system uses to package the account on the source server. If a daily incremental backup exists, WHM uses that backup as a starting point. The system then updates the package before transfer.
Select Use custom account packaging modules from "/var/cpanel/lib/Whostmgr/Pkgacct" to use packaging scripts in that directory.
cPanel & WHM always prioritizes custom restore modules in the "/var/cpanel/perl/Whostmgr/Transfers/Systems" directory over the cPanel-provided modules in the "/usr/local/cpanel/Whostmgr/Transfers/Systems" directory.
The "/var/cpanel/perl/Whostmgr/Transfers/Systems" directory stores any custom modules that you create.
Enter the number of transfer threads to use in the "Number of Transfer Threads" textbox.
Enter the number of restore threads to use in the "Number of Restore Threads" textbox.
Fetch account list
After you have completed your selections, click on "Fetch Account List". A new interface will appear allowing you to continue.
The Account List interface
At the top of the Account List interface, the hosting software and version of the remote server will be displayed. If this information is incorrect, you should click "Reanalyze Remote Server". Below the remote server information, the interface will display whether there are no available IP addresses. If there is no available IP addresses that exist on the target server, any accounts on the remote server with a dedicated IP address will not transfer.
The service configurations section allows you to select the configurations on the source server that you wish to copy over to the destination server. You can transfer the configurations for Apache, backups, cPanel themes, Exim, MySQL, and WHM (whmconf).
In order to select your desired configurations, you will need to perform the following;
Enter the desired remote server that you wish to transfer the configurations from in the Remote Server Address textbox.
The system displays the source server's information. Click "Show" next to Service Configurations to reveal all of the available configurations on your server. The Configuration Name and Analysis columns display the available configurations and versions.
Select the configurations that you wish to transfer to your local server. Notes: The system displays warning messages in yellow and blocker messages in red text. If you receive a blocker message, the system disables theEasyApache option.
Click Copy. The system will display the progress interface. It is not possible for you to click "Copy" until you have selected a configuration to transfer.
The "Transfer" column displays the status of all configurations from the source server.
Restore the PHP-FPM .yaml configuration file
Be aware that a MultiPHP user's PHP-FPM setting will not transfer when you use this interface. The system will transfer the PHP-FPM .yaml configurations, but will not restore it. This is because of undetermined status of PHP and FPM services. The system will instead copy the PHP-FPM .yaml configuration file to the "filename.php-fpm.transferred" file. In order to restore the PHP-FPM .yaml configuration file manually, you will need to perform the following;
First you will need to rename the file to the "filename.php-fpm.yaml" file.
CentOS, Red Hat, and CloudLinux 5 Migrations
Please be aware that on March 31, 2017, Red Hat will deprecate all CentOS 5 systems. As a result cPanel, Inc. will no longer provide maintenance and security updates for the CentOS 5 system. The Transfer Tool interface can be used to assist you in your migration from CentOS 5 systems to a higher version of CentOS. As a result of this coming deprecation it is strongly recommend that you migrate to a CentOS 7 server. In order to migrate your CentOS 5 server to a CentOS 7 server, you will need to perform the following;
First you should Contact your hosting provider and acquire a CentOS 7 server to which to migrate.
The packages section of the Account List interface allows you to select the packages on the remote server that you wish to copy to your local server.
How to copy packages
In order to copy a package you will need to perform the following;
First select the packages that you wish to copy in the table under the Packages heading.
The restore system will attempt to extract the package information from the cpmove file. If the package does not exist on the target system, the system will create the package and assign it to the account. If the system fails to create the package, the system will assign the default package to the account.
This section of the interface allows you to search for and select accounts to transfer to your server.
How to copy accounts
In order to toggle an option for all accounts, you will need to select the checkbox at the top of the appropriate column in the table header. To copy accounts you will need to perform the following;
Select the accounts to copy in the table under the Accounts heading. To copy all of the accounts on the remote server, select the checkbox at the top of the column in the table header. You can use the Search textbox to filter the list of accounts and use the navigation controls to page through the list of packages. You can also click a column header to sort the accounts by that column.
Specify the copied account's new username and enter the new username in the "User" textbox. The "User" textboxes use the following colors as warning indicators: Red indicates that the username exists on this server, and the account will fail to copy if you do not change the username or select Overwrite. Yellow indicates that the account has a dedicated IP address on the remote server. Green indicates that the account does not already exist.
Select the accounts that will transfer their home directories under the "Copy Home Directory" heading. Use the Filter textbox to filter the list of accounts by the Domain, User, or Reseller columns. Accounts will retain their mailbox format settings from the source server. If an account uses maildir format on the source server, it will use maildir format on the target server.
Select the accounts that will retain their reseller privileges under the Copy Reseller Privileges heading. This option is not available if you selected the Restricted Restore feature in the Security section of the previous interface.
Select the accounts that will transfer their account databases under the Copy Databases heading.
Select the accounts that will transfer their bandwidth data under the Copy Bandwidth Data heading. If you transfer an account from cPanel & WHM to an earlier version, the account will lose its bandwidth data.
Select accounts for express transfer under the Express transfer heading.
If an account already exists on the server with the same information, the Overwrite Account column will display a checkbox that will allow you to transfer the account and overwrite all the data in the account.
Finally click "Copy". After you click Copy, the "Account Transfer" interface will appear.
The transfer process
In the following, domain represents the name of a domain that you transferred. The system will consider any two records with the same resource name and type to be duplicates.
In order to restore the PHP-FPM .yaml configuration file manually, you will need to perform the following;
First you will need to rename the file to the "filename.php-fpm.yaml" file.
When you use the Transfer Tool interface to transfer accounts to the server, the system will perform the following;
The system creates the account on the destination server.
If the zone file's MX preference is set to 0 and the zone file is $PRIMARY_DOMAIN or mail.$PRIMARY_DOMAIN , the system will not merge in the generated templates and will not update the MX preference from the source server.
The system will comment out duplicate records.
An express transfer will perform the following actions on the remote server;
Updates the account's A record to point to the destination server.
Suspends the transferred accounts on the source server.
The system performs changes on the source server in the /usr/local/cpanel/scripts/xferpoint directory.