Manually restore a home directory backup from SSH

bblsystems

Member
Apr 19, 2016
5
0
1
Atlanta
cPanel Access Level
Root Administrator
I have a home directory backup created via cPanel using Download a Home Directory Backup.

I want to restore it via command prompt (SSH) rather than via the cPanel restore.

If I can SSH into the account and upload the *.tar.gz file, what command would I use to restore it?
Where exactly should I put the *.tar.gz file before running the command?

Thank you!
Chris
 

bblsystems

Member
Apr 19, 2016
5
0
1
Atlanta
cPanel Access Level
Root Administrator
Sorry for the repeat, the forum software would not let me edit the original post.


I need to transfer a cPanel from one server to another.

I cannot use cpmove, as the new hosting company won't transfer accounts with backups bigger than 4gb and this file is 9gb.
Also, the home directory restore on the new server via cPanel failed when I tried it, with a connection reset error (maybe because of the file size)



I have a home directory backup created via cPanel using Download a Home Directory Backup. It contains a Wordpress site and WHMCS.

I want to restore it to a new server via command prompt (SSH) rather than via the cPanel restore.

1. Can you restore a home directory backup to a new server?

2. If I can SSH into the account and upload the *.tar.gz file, what command would I use to restore it?

3. Where exactly should I put the *.tar.gz file before running the command?


Once the home directory backup is restored, I plan to backup and restore the mysql DB's associated with it.


Thank you!
Chris
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello Chris,

The best approach will depend on your access rights on the source and destination servers. Can you verify if you have root access to either the source or destination servers?

Thank you.
 

cactux

Registered
Jan 21, 2009
1
0
50
I am interested by the answer to the question asked by bblsystems because I have a similar need.
My backup is 148GB and is said to be CRC corrupted. So I am using gzrecover on it, hopefully I'll get a working tar file. What should I do next to restore it?
Is there a script I could run on the tar file or an extracted directory of it?
Thanks a lot.
I have SSH and root access.
 

mshannaq

Member
Jan 16, 2010
7
0
51
Iam intresed of bblsystems question and I hope to have a solution
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
14,425
2,259
363
cPanel Access Level
Root Administrator
@mshannaq - there currently are not any command line tools to restore a home directory backup over the command line. It would be best to perform that work through the cPanel interface.

If you have a full account backup (not just the home directory) and root access to the server, you can use /scripts/restorepkg to restore that type of backup.