Any way to transfer more than 50 databases to new cPanel server?

meeven

Well-Known Member
May 8, 2007
132
2
168
A client has been running a web application for schools that now has more than 60 databases, something like one for each school. Because their existing server is CentOS 5.x, I am migrating them to CentOS 7.x based cPanel server.

Rsync is handy for transferring the files (WHM transfer tool copied only 3.2 of nearly 13 GB data) to the new server, but I am not sure how to copy all those databases.

Does anyone know of a way to copy the dbs that would be automatically copied over to phpmyadmin as well on the new server?

Thanks in advance.
 

ruzbehraja

Well-Known Member
May 19, 2011
392
11
68
cPanel Access Level
Root Administrator
Rsync is handy for transferring the files (WHM transfer tool copied only 3.2 of nearly 13 GB data) to the new server, but I am not sure how to copy all those databases.
Using rsync is NOT supported by cPanel and almost always ends up breaking something, unless you are an expert at it and understand cPanel very well too.

In the WHM transfer tool, you can select the option to transfer databases separately from the Home Directory. The Transfer Tool maybe slow, but is the only sure-shot method of migrating the databases.

===

The other way to do it is using mysqldump, then copying over the dump file and then restoring the mysqldump on the new server.

This is the command for doing it for all databases on the server. Read the entire documentation of mysqldump before you do this.

Code:
mysqldump -AER > /root/recovery_dump.sql

mysql < /root/recovery_dump.sql
 

meeven

Well-Known Member
May 8, 2007
132
2
168
Thanks! Somehow, I had completely overlooked the option to copy the databases separately in the transfer tool. Thanks for pointing that out. It's the db part that puzzled me.

I am reasonably familiar with rsync and adjusting permissions, having done data migration a few times from one linux server to another, including to and from cPanel servers.