How to Migrate cPanel Accounts manually using ssh
Sometimes it’s not enough to have the inbuilt options inside cPanel to migrate accounts.
For example, accounts over 5GB sometimes won’t transfer correctly and a manual transfer will need to be done.
In this article we are going to package up a cPanel account using the command line then migrate it to another cPanel server and unpack it.
To get started login via SSH On the Source Server (where the account to be migrated is currently) and then let’s package the account up.
Run the below command replacing the bit after /scripts/pkgaccct with the cPanel user to be packed up, In this example it’s demo.
/scripts/pkgacct demo
Migrate cPanel Account
Next, Let’s log in to the Destination server via SSH. The server you are moving the account too.
We will copy the account from the source server by running one of the below commands;
scp -P 22 /home/cpmove-demo.tar.gz [email protected]:/home/
For larger migrations, it’s best to use RSYNC.
rsync -avz -e "ssh -p 22" [email protected]:/home/cpmove-demo.tar.gz* /home/
The -P symbol represents the port to connect to via SSH.
Restore cPanel Account
On the destination server, you now should have your backup located in the /home directory.
The last thing to do is to restore that cPanel backup to your destination server. Issue the command and include the username of the backup account. It’s in the backup name after cpmove.
/scripts/restorepkg demo
You will now have your account migrated to the new cPanel server and you should now update the name servers on the domain name to point to your new cPanel Server. The restorepkg script takes care of modifying the DNS record of your cPanel account but you can inspect the DNS Zone Record and make changes to the record from WHM by using the Edit DNS Zone link.
How was this article? – How to Migrate cPanel Accounts manually using ssh
You might also like
More from cPanel
Help fixing Error: last request failed: [AUTH] Authentication failed.
The Error: last request failed: [AUTH] Authentication failed error can be caused by a range of things. It could be …
How To Install Ioncube V11 In cPanel
How To Install Ioncube V11 In cPanel Ioncube have released V11 of the Ioncube Loaders. Ioncube protects PHP code from theft …
cPanel Backups Per Account or Entire MySQL Directory?
cPanel Backups Per Account or Entire MySQL Directory? The integrated cPanel backups system allows you to take a backup of each …