Knowledgebase: WHM > Transfers > Transfer Tool
Transfer Tool
Posted by Matthew Jeffels, Last modified by Matthew Jeffels on 09 November 2016 02:04 PM

Transfer Tool

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.
root-level privileges with the "su" or "sudo" commands.

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.
If one of the accounts that you wish to transfer uses Microsoft FrontPage on the remote server, it is strongly recommend that you disable FrontPage for that account before you attempt to transfer the account. cPanel & WHM no longer supports FrontPage, and the restoration process will not restore FrontPage-specific files and directories.

Warning; Do not shut down or restart any of the processes on either server during the transfer and restoration process.
The "Transfer Tool" feature will not transfer the DNS zone templates. If custom DNS zone templates do exist on the source server, the system will ignore these zone templates when it recreates the account on the destination server.

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.
"example" - this represents the new account's username.
"127.0.0.1" - this represents the new account's IP address.
"12345luggage" - represents the new account's password.

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 the "Remote SSH port" textbox,you will need to specify the port to use. By default the value for SSH is port is 22.

Authentication

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.
Enter the remote account's password in the Password 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.

Security

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.

Advanced

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:

Auto Detect
cPanel & WHM
DirectAdmin
Ensim (Parallels Pro)
Plesk

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.
The system will not create the "/var/cpanel/lib/Whostmgr/Pkgacctdirectory" by default. You must create the /var/cpanel/lib/Whostmgr/Pkgacct directory before you select this option, if the directory does not exist.

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.
The "/usr/local/cpanel/Whostmgr/Transfers/Systems" directory stores the modules that ship with cPanel & WHM.

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.

Service Configurations

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.
Enter the port number. By default the system will use port 22.
Select whether to log in as the "root" user or another user account. The system will default to the root user.
Select the desired authentication method. The system defaults to "Password" for authentication.
Click Fetch Account List.

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.
The "Restore" column displays the status of all configurations to the destination server.
The system will display any error messages in yellow and warning messages in red text.
The summary bar displays the transferred or restored configurations.

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.
You will then need to run the following command: /scripts/php_fpm_config --rebuild
Once you have ran this command the system will restore the account's PHP-FPM .yaml configuration 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.
Log in to WHM as the root user and navigate to the Transfer Tool interface.
Perform a transfer to the new server using this interface. It is strongly recommend that you migrate your accounts and configurations separately. Migrate the configurations first. Verify that your server is operating as expected, and then transfer the accounts across, using the Transfer Tool interface to migrate the desired accounts.

Packages

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.
Select the checkbox in the table header to select all of the packages from the remote server. Alternatively you can use the "Search" textbox to filter the list of packages and select the one(s) you wish to transfer. You can use the navigation controls to go through the list of packages, and clicking on a column header will sort the packages by that column.
Finally click "Copy" to copy the package to the server.

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.
If the feature list for the account all ready exists on the target system, the system will assign it to the account. If the feature list does not exist however, the system will assign the default feature list to the account.

Accounts

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 to which the system will assign dedicated IP addresses under the Dedicated IP Address heading. The interface does not allow you to assign more dedicated IP addresses than the number of available IP addresses on your server. If you select an account with a dedicated IP address on the remote server but an available IP address does not exist on your server, the transfer fails.

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.
MultiPHP user's PHP-FPM settings will not transfer. The system instead transfers the PHP-FPM .yaml configurations, but will not place restore them due to the undetermined status of PHP and FPM services. The system copies 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.
You will then need to run the following command: /scripts/php_fpm_config --rebuild
Once you have ran this command the system will restore the account's PHP-FPM .yaml configuration 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.
The system will then compare the DNS zone file from the account's backup file with the template-generated zone file that the system will have generated during account creation. The "Transfer Tool" feature does not transfer the DNS zone templates. If custom DNS zone templates do exist on the source server, the system will ignore these zone templates when it recreates the account.
The system will update the SOA record to match the target server's zone templates and comments out any existing SOA record from the source server.
The system will update the domain NS records to match the target server's zone templates and comments out duplicate domain NS records from the source server.
The system will update the ftp.domain A, AAAA, and CNAME records in order to match the target server's DNS templates and will comment out any identical ftp.domainrecords from the source server. Please not that cPanel & WHM uses the IP address in the destination server's virtual-ftp zone template (this is usually, the server's main IP address) for virtual FTP when the account exists on a shared IP.
The system will check whether the template-generated zone file uses an MX preference of 0, it will then perform the following:

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.
If the zone file's MX preference is set to 0 and the zone file is not $PRIMARY_DOMAIN or mail.$PRIMARY_DOMAIN ( this is a non-standard mail configuration), the system will merge the generated templates and will proceed to comment out templates from the source server. In example, when the zone template's MX record defines an external mail service, the system prefers that entry over the record in the backup.

The system will comment out duplicate records.
The system will comment out CNAME records that conflict with any other records on the server. If multiple CNAME records conflict, the system will comment out all but one CNAME record.
The system will increment the SOA serial number for the domain.
The system will update the records that reference the old IP address to use the account's new IP.
The system will then remove comments that are older than 30 days.
The system will update CalDAV and CardDAV records in order to match the target server's DNS template. However if the zone file contains an $ORIGIN directive for an additional domain, the system will not update that additional domain's records.

Express transfers

An express transfer will perform the following actions on the remote server;

Updates the account's A record to point to the destination server.
Changes the domain's nameserver entry to point to the destination server.
Updates the email routing configuration, so that mail arrives at the destination server.
Adds a redirect for the Account Moved page (cgi-sys/movingpage.cgi) for the following file extensions:

.dynamiccontent .pl .plx .perl .cgi .php .php4 .php5 .php6 .php3 .shmtl

Suspends the transferred accounts on the source server.

The system performs changes on the source server in the /usr/local/cpanel/scripts/xferpoint directory.

Thanks

Matt Jeffels
PAC Web Hosting

(0 vote(s))
Helpful
Not helpful

Comments (0)