Copying Server Manually

jazee

Well-Known Member
Jan 12, 2015
125
5
68
cPanel Access Level
Root Administrator
Let's say I run into a situation where I need to replace my physical server and restore all the files, but my WHM account and full system backup is a day old. Since that backup, a few accounts may have gotten new email and a few databases may have been updated. For simplicity sets assume no files in the accounts (such as html files on the websites, etc) had been added/changed. Let's also assume the old server is accessible only via SSH command line shell and WHM/Cpanel is inaccessible.

What would I need to do to get everything restored properly? My guess is...

- Restore system and account backups.

- Shut down MySQL and then copy the mysql files from each account. I assume it would not be a good idea to copy the other databases as then I would potentially overwrite my WHM/Cpanel config with corrupted data if the older server's WHM/Cpanel setup had become corrupted. Where are all the account MySql data file located? After copy, restart MySQL

- Shut down the email MTA (how?) and then copy all the account email files over (from where?) Then restart the MTA.

Anything I'm missing if all I'm trying to do is get the MySQL DBs and emails that were on the old server? I don't really care about missing log files, bandwidth data, etc.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,226
463
Hello,

You should be able to follow the instructions on this thread since the email data is stored in the account's home directory:

Move cPanel account manually without taking full backup

It also provides details on copying databases using the mysqldump utility.

Let us know if you have any questions.

Thank you.