Hostwinds Tutorials

Search results for:


How to Migrate to New Server with cpmove

Tags: cPanel 

You can transfer/migrate an account using cpmove by performing the following steps:

Step 1. Connect to the old server via an SSH terminal

Step 2. Run this command with Cpanel username being the username that you want to package and move

/scripts/pkgacct cpanelusername

Step 3. An FTP or SFTP client can perform the transfer, or you can choose to do it with rsync from SSH via the following command.

rsync -vrplogDtH -e "ssh -p PORT#DESTSERVER" /home/cpmove-CPANELUSERNAME.tar.gz root@TARGETIP:/home/cpmove-CPANELUSERNAME.tar.gz

PORT#DESTSERVER – use the port number 22 or your custom port number

CPANELUSERNAME should be your cPanel username for your account and is normally in all lowercase

TARGETIP - IP of the server you're moving to

After transferring, connect the destination server with an SSH terminal, then run the following for each one of the accounts you wish to restore on the new server.

/scripts/restorepkg CPANELUSERNAME

The filename of the backup must use one of the following formats:

cpmove-{USER}
cpmove-{USER}.tar
cpmove-{USER}.tar. gz
{USER}.tar
{USER}.tar.gz
backup-{BACKUP-DATE_TIME}_{USER}.tar
backup-{BACKUP-DATE_TIME}_{USER}.tar.gz

For this feature to work, the backup or cpmove file must reside in one of the following directories:

CPANELUSERNAME should be the cPanel username for your account, and the account should not exist already. This is normally in all lowercase.

Written by Hostwinds Team  /  December 13, 2016