Preforming a cPanel Site Migraiton

WHM has some great tools built in, one of which is their transfer tool. This allows you to move sites across differant servers using a vairety of control panels with very little effort. This can come in handy if you have a cluster of servers or are planning to migrate your services to another site entirley. Currently the tool supports migrating from the following control panels:

  • Cpanel & WHM
  • Parralels Plesk
  • DirectAdmin
  • Ensim

cPanel allows you to pull all the data across into one location that is managed with their WHM/cPanel controls which grant great versatility and usability compared to some of the other control panels available.

When you login with root access on the destination server you will need to either search for or select the Transfer Tool.

Before you begin the full migration you will scan the host server and test to see what information will be brought over, and if anything needs doing on either side to make the migration work correctly. The host server will need a SSH port to preform the transfer so arrange for the port to be allowed through any firewalls you may have. The default is 22, but it can be advisable to use a different port for security reasons. If you have SSH secured via a key, you will need the public key that is allocated to your user name.

On the main Transfer tool screen you will have several options you need to fill out:

  • Remote server information
  • Remote server Address – the IP address of the server you want to transfer the files from.
  • Remote SSH port – as above, the port number you have assigned to SSH, the default 22 will be pre-filled. If you have not changed the port leave this as is.

Authentication

Login – select either root (default) or specify your own user name. I would recommend using root access if you have it, which should be available as WHM uses the root server account to login.
Authentication method – password (default) enter the password associated with the specified account name, either root or your own. Only use the SSH Public Key option if your SSH connection is secured with a key and you have the public key file available. If you have a key you need to click the link to add it to the destination servers repository. you will need the passphrase and the public key.

 

Security

Here you have the option to change the transfer to a restricted restore. This option will see addition checks preformed on the files as they are tested before copying. If one or more components are flagged for having security issues they will not be copied and you will get an error report detailing the affected files. This is an experimental feature and is not to be considered as a definitive security control feature at current writing. As per the warning cPanel recommends only restoring data from people/domains you would trust with root access to the server. You have the option to view a searchable list of WHM/cPanel modules and see if they can be used/copied in Restricted restore mode.

 

Advanced

These options are hidden by default but click view to access more detailed settings regarding the transfer.

Remote Server Type – Here you can specify which control panel you will be transferring from. If left on Auto Detect the tool will do this for you but you can specify the option yourself if you know what you are transferring from. I would recommend leaving this on Auto Detect unless you have problems detecting the host panel.
Unencrypted – If the host is using cPanel 11.23.6 you can encrypt the data transfer for added security, this will add extra processing time to the task however.
Compressed Transfers – selected by default, this will compress the data during the transfer to help speed up the process.
Low Priority – Handy to use if your host server is in production and has a lot of live content, this moves the transfer lower down in the priority list to ensure resources are available for the host servers applications. Depending on the host this can increase the transfer time significantly.
Use Incremental Backups – If both sides are using cPanel 11.29.126 or later this can be used to help speed up the transfer process
Number of Transfer/Restore Threads – The recommended number here is 5, which will be pre-filled. Any more and you will start to see performance issues on both sides.
Transfer Session Timeout – The timeout value in seconds, useful to increase if your connection between the servers is slow. Increasing this amount can lead to a slower transfer however and should only be changed if needed.

Once all the settings are selected/filled in you can click the ‘Fetch Account List’ button to see what is available on the host server to transfer.

Once the connection is established and the tool has pre-filled all the information in, you will be told at the top of the screen what control panel and version the host and destination servers are using. Any warnings detected in the configuration will be displayed here.

Service Configurations – hidden by default and none of the options are selected. These are system settings for the features built into WHM/cPanel and this gives you the option to copy the settings over from the host server. Useful if you are doing a complete transfer, but if you are only doing a few domains it is best to leave these options un-selected. When you view these options you will get a warning advising that selecting any option here will overwrite the destination server configuration.

 

Packages – Here you will have a list of packages installed on the host

Accounts – This will list all the available domains and give you several options to select for each one.

Copy Home Directory – will copy all the site files across, selected by default as this is the point of using this tool!

Copy Re-seller Privileges – not enabled by default but allows you to grant the users the same level of access as they had on the host server. You can leave this empty and reset all the access permissions for each user one at a time, but might be a good idea to use this if you are migrating a lot of sites.

Copy Databases – To copy the sites databases both the host and destination server need to be running the same version of database software. You are able to copy MySQL and MariaDB databases. If you run into issues with version numbers here you can always export the data and import the databases into the host server manually.

Copy Bandwidth Data РAllows you to bring over the historic bandwidth data for the websites, this can be useful in allowing historic monitoring information to be accessed.

Express Transfer – Only available on matching versions of cPanel, this will increase the file transfer speed.

Overwrite – This option will overwrite any information on the destination server that matches the file names on the host. This is un-selected by default but if for some reason you are migrating a site over a second time, make sure this option is enabled or you will not get the newer files.

 

Once you have selected all the sites and configurations you want to move across select the ‘copy’ button to initiate the process.

This will take you to another screen where you can view the progress and see any alerts or errors that occur. You can navigate away from this page without affecting the copy as it will run in the background. If you want to stop the transfer you will have a cancel option on this page, this is not recommended as it can lead to partial file transfers and corrupt configuration files.

The transfer may take some time to complete depending on the amount of data and the various options you have to influence the transfer speed. Once it is complete you will get a generated report detailing what was completed and if the process ran into any errors.