Migrate cPanel to a new server.

doanminhchau

Active Member
Dec 1, 2014
27
0
1
cPanel Access Level
Root Administrator
Hi everyone,

My cPanel server was full of data, and I want to copy all data and cPanel' s settings to the new server.
I have two questions, please help me.
First, The current version of my cPanel is 11.44, I want to install the newest version on the new server and migrate all backup files to this server, is it ok?
Secondly, I followed this link (https://documentation.cpanel.net/di...uration#BackupConfiguration-SaveConfiguration) to check what files and folders that I need to migrate to the new server, but the folder /var/cpanel have many files and folders, this make me confused, please help me that what files and folders in /var/cpanel that I need to backup and move to the new server.
Thanks,
 

doanminhchau

Active Member
Dec 1, 2014
27
0
1
cPanel Access Level
Root Administrator
Dear everybody,
I have a Centos OS server running cPanel with 11.44 version, the user data on this server is nearly full, and I need to migrate data and cPanel to the new server.
On the new server, can I use the newest version of cPanel and backup cPanel's setting from the old server and move to the new one?
I saw a link from cPanel: https://documentation.cpanel.net/di...uration#BackupConfiguration-SaveConfiguration
but the folder /var/cpanel have too many files and folders. This make me confused, so what necessary files and folder in /var/cpanel that I need to migrate to the new server?
Thanks,
 

server9host

Well-Known Member
Sep 18, 2013
160
0
16
India
cPanel Access Level
Root Administrator
Hello,

Did you try to transfer your cpanel account using Trasfer Tool using WHM.

Using Trasfer Tool you can easily transfer the cpanel account on new server.



Thanks
 

danrussell

Well-Known Member
Nov 5, 2014
61
4
58
cPanel Access Level
Root Administrator
Hi :),

What is the version of MySQL and PHP you are using on both the servers?
If versions are latest on new server, and not on the old one, can cause errors after migration.

So be sure to keep the versions same or upgrade the MySQL and PHP on old server first.
Then you can easily migrate the accounts using Migration Tools in WHM. It will handle all the needed file migrations.
 
Last edited:

doanminhchau

Active Member
Dec 1, 2014
27
0
1
cPanel Access Level
Root Administrator
Hi server9host,
If I use transfer tool in WHM, I can only back up all the accounts in the current server to the new one. The configuration of cPanel can't be migrated to the new server. Thanks for your advice.
Hi danrussell,
The version of mysql and php in my current server is old version, its version is 5.1.
Could I use rsync tool to migrate all my accounts in /home/ folder to the new server and copy many configuration file of cPanel to the new server? This will help me save time and cut down load on the current server.
 

danrussell

Well-Known Member
Nov 5, 2014
61
4
58
cPanel Access Level
Root Administrator
Hi doanminhchau :),

Yes, you can use rsync to migrate all the accounts to new server. Its a tricky command, be careful to use the '/' in the command.
If you wish to use Latest cPanel version, you will need to have upgraded PHP and MySQL on the new server. So you need to confirm the websites are compatible with Higher PHP and MySQL versions.
 

doanminhchau

Active Member
Dec 1, 2014
27
0
1
cPanel Access Level
Root Administrator
Thanks for your advice danrussell,
This is the first time that I migrate a cPanel server, so that I have a little worry about the procedure.
I have two servers using cPanel version 11.40 and 11.44.
I will install two new server with newest version and migrate all user's data and server setting to the new one.
Thanks again,
Sorry for replying lately because I have a long new year holiday.
I'm in trial procedure.
 

doanminhchau

Active Member
Dec 1, 2014
27
0
1
cPanel Access Level
Root Administrator
Hello cPanelMichael,
Thanks for your support,
I have some issues that make me confused. My data is too big, nearly 2TB, if I use Transfer Tool, is it took too much time?
How many setting files of cPanel that I need to backup and move to the new server.
If I use the newest version of cPanel, the files from my old server will be appropriate?
If I change the IP of the new server to the IP of the old one, the license will be updated automatically?
 

anton_latvia

Well-Known Member
PartnerNOC
May 11, 2004
403
13
168
Latvia
cPanel Access Level
Root Administrator
When we do such upgrades - we always install second (new) server with temporary IP - transfer all account and swap IP to the old IP, so we get new server running with old IP and customers don't have to update DNS.
 

doanminhchau

Active Member
Dec 1, 2014
27
0
1
cPanel Access Level
Root Administrator
Hi everyone,
The quantity of account's data is too big, I have 15 day trial cPanel version, so that I have to finish my copy progress within 15 days, If I can not, how can I continue copying the data and using cPanel?
 
Jan 6, 2015
8
0
1
cPanel Access Level
Root Administrator
Hello,

If you cannot done the migration process within the trail period you may change the server's main IP address & replace with the IP address which is having the cPanel trail license.

Or else you can purchase the license from the cPanel.

Hope this may help you on this.
 

doanminhchau

Active Member
Dec 1, 2014
27
0
1
cPanel Access Level
Root Administrator
Thanks cPanelMichael,
All of my data are stored in /home folder, thousands of domains in there.
I think the restore progress is too slow.
I got this error with with some accounts when I use transfer tool:Failed: The remote “pkgacct” command failed because of an error: ERROR: Failed to dump one or more databases, how can I fix it?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,222
463
I got this error with with some accounts when I use transfer tool:Failed: The remote “pkgacct” command failed because of an error: ERROR: Failed to dump one or more databases, how can I fix it?
Do you notice any errors when attempting to manually backup those databases on the source server? EX:

Code:
mysqldump database_name > /path/to/database.sql
Note that you can view the full transfer logs via:

"WHM Home » Transfers » Review Transfers and Restores"

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,222
463
It's possibly related to issues with the database on the source server. Check for errors when attempting to manually backup those databases on the source server with a command such as:

Code:
mysqldump database_name > /path/to/database.sql
Thank you.
 

doanminhchau

Active Member
Dec 1, 2014
27
0
1
cPanel Access Level
Root Administrator
Hi Michael,
Thanks for your support,

By the way, I will change the IP address on the new server to the old server's ip address. Could you tell my what steps and files that I need to change to keep the license on the new server?