How to Migrate Hosting Accounts With WHM/Cpanel


There is an interesting feature in WHM/Cpanel to backup and restore accounts between different servers. I used this feature to move my hosting accounts from my old servers to the new one, most important of all is that I have the same configuration in the two servers ready to accept new active accounts.
From Cpanel you can easily create a full backup of your account to move it, and I did it for all simple accounts, the only problem I have found when migration come with some changes. For example if your old username used for reseller exist already on the new server, or is used for another domain and the migration require your old domain to be assigned to a new username. This is the only case I have found where the Cpanel move files won’t work correctly. Such cases I just treat them manually, fortunately it happened only for one account.

So the simple steps are the following :
1- From your old Cpanel choose Backups, then “Generate/Download a Full Backup”
2- In the new server be sure you have ftp active so you can move directly the backup
3- Choose FTP, SFTP or SCP depending on the options you have, and enter your email to get notified when backup transfer is finished.
4- Generate a backup
5- Now in your new server move the transferred backup from /home/username to /home
6- From new server WHM, choose “Restore a Full Backup/cpmove file”
7- You should see the backup file you have moved available
8- Enter the same username, that you’ll find also in the backup file name backup-date_time_user.tar.gz
9- Hit Restore
The account should be restored correctly. Now last step
10- Update DNS to make it point to the new server and change it from your new WHM DNS zone. The copying process will copy also the old DNS so you have to change it manually otherwise it might cause problems and keep website retrieved from the old IPs.
Hope this was helpful and let me know if this doesn’t work for you.
Update : Step 10 updated, I forgot to mention that DNS zones should be updated in WHM to reflect the new DNS change.

Previous articleWikipedia Blocked SEO URLs
Next articleFastCGI and PHP
Hatem Ben Yacoub, PHP expert and PHP5.3 ZCE, Energy engineer, Entrepreneur, ICT & eGov consultant, Senior Systems architect, Independent Open Data expert and Open Source evangelist.