Migrate from cPanel to Plesk Using Plesk Migrator
Posted on July 10th, 2020
Plesk Migrator is a tool that Plesk provides. This extension provides pre- and post-migration checks, error reporting features, etc. It allows us to re-sync data between an old and new server after migration to make the migration process easy. We can use Plesk Migrator for updating Plesk to the latest version. This process is also known as ‘upgrade by transfer.’ Upgrade by transfer helps to move all hosting data and settings from the current Plesk server to a server with the latest version installed.
Migrate using Plesk Web Interface
We can use the Plesk web interface (UI) for the migration of domains from cPanel to Plesk.
Login to the Plesk admin panel.
Go to ‘Extensions’ and open ‘Plesk Migrator’ under ‘Server Tools’ and click install to install the Plesk Migrator.
After the installation completes, go to ‘Extensions’ and click ‘Open’ next to Plesk Migrator under the ‘My Extension’ tab.
Click ‘Start a New Migration’.
Switch the ‘Panel type’ to cPanel and fill the Source server’s IP address, SSH port number, the login and password of a root user on the source server, etc.
Click ‘Prepare migration’ to start the migration process. Plesk Migrator fetches the data from the source server. If the connection fails, then you need to check the source server information and make sure that the firewall does not block the connection and try again.
After the completion of the migration process, you can find yourself on the ‘List of Subscription’ tab.
In this interface, you can select the subscriptions to be migrated. Also, you can use any of the four available filters:
- By Subscription: If you migrate a subscription owned by a customer or a reseller, the corresponding customer/reseller account gets migrated unless a custom subscription owner is specified.
- By Customer: If you migrate a customer account, it migrates all the subscriptions owned by the account.
- By Reseller: If you migrate a reseller account, all subscriptions owned by the account gets migrated, but it does not automatically migrate the customer accounts owned by the reseller. If you select a reseller account and one or more customer accounts owned by that reseller for migration, the destination server preserves the reseller’s ownership of the customer accounts.
- By Hosting Plan: If you migrate a hosting plan, all subscriptions based on that hosting plan migrate.
Select the content type that must be transferred or migrated. If you want to change any migration settings, then you can do the same by clicking ‘Settings’ in the upper-right corner.
After selecting the corresponding settings and migration options, you can click ‘Migrate’ to proceed. Plesk runs the pre-migration checks to detect potential issues and display a report, as shown below.
If you detect any issues in the report, we advise to fix that and click Refresh to re-run the tests.
When the report is clean after the pre-migration checks, then you can click ‘Start migration’ to begin the migration process.
You can monitor the migration process on the ‘Overview’ tab. The status of the migration gets displayed in the overview tab as either completed, successfully, or failed.
If you want to perform any additional sync of a subscription’s content after the migration, you can click ‘Re-sync’ next to the subscription’s name.
If you want to migrate additional subscriptions from the source server, repeat from step 7 to 13.
You can click ‘Finish Migration’ if all the data has been migrated, this removes it from the list of ongoing migrations.
Migrate via CLI through SSH
Log in to Plesk and install ‘Plesk Migrator’.
Connect to the server via SSH.
If the configuration directory does not exist, then create the same and switch to that directory.
# mkdir /usr/local/psa/var/modules/panel-migrator/conf # cd /usr/local/psa/var/modules/panel-migrator/conf
Create ‘config.ini’ in the current directory with below content:
# cat config.ini [GLOBAL] source-type: cpanel source-servers: cpanel target-type: plesk [plesk] ip: <destination_server_IP_address> os: unix [cpanel] ip: <source_server_IP_address> os: unix ssh-password: <source_server_root_password> # Uncomment ssh-port string below if the SSH port is not 22 # ssh-port: <replace_with_ssh_port_number> # postgres-password: <password>
Note: If any PostgreSQL databases from cPanel server need to be migrated, then you need to make sure that the PostgreSQL administrator password is mentioned in the ‘config.ini’ file.
Generate the migration list file using the below command
# usr/local/psa/admin/sbin/modules/panel-migrator/plesk-migrator generate-migration-list
You can edit the above file to remove domains that does not need to be migrated, and assign domains to service plans:
# vi /usr/local/psa/admin/sbin/modules/panel-migrator/sessions/migration-session/migration-list
Start the migration by running the below command.
# /usr/local/psa/admin/sbin/modules/panel-migrator/plesk-migrator transfer-accounts
After the transfer, run the below command to resynchronize the content. This command ignores the files which have already copied, and it re-syncs the modified contents.
# /usr/local/psa/admin/sbin/modules/panel-migrator/plesk-migrator copy-content
To check the operability of the migrated objects on the destination server, you can run the following command after migration.
# /usr/local/psa/admin/sbin/modules/panel-migrator/plesk-migrator test-all
If you need any further help, please do reach our support department.