Operating System & Version
CentOS 7
cPanel & WHM Version
104

krizag

Member
Jun 19, 2009
14
1
53
What's the fast way of copying a large database (size is around 150Gb) onto another server? Both old and new servers are cPanel ones and mariadb 10.5 version. I only need to move the db to another server.
 

ffeingol

Well-Known Member
PartnerNOC
Nov 9, 2001
963
437
363
cPanel Access Level
DataCenter Provider
Pretty much the only "safe" way to move it is:
  • CLI MysQL dump on the old server
  • Transfer the dump from old to new
  • CLI MysQL load
I know in the past people have tired to copy the files that make up the DB, but with most DB's having innodb tables now, that's virtually impossible.
 
  • Like
Reactions: cPRex and krizag

HostNoc

Well-Known Member
Feb 20, 2020
157
38
28
Ontario
cPanel Access Level
Root Administrator
Hello,

First take mysqldump
mysqldump XYZ > XYZ.sql

second scp the dump file from old server to new server

third on new server create DB and user

lastly mysql command on new server
mysql -u abc -p abc_blog < XYZ.sql


Regards,