Restoring a full backup from command line

apc1

Well-Known Member
Oct 18, 2004
123
0
166
Hello,

I need to restore a full backup from the command line because the WHM restore does not appear to work. If I select the account, which does appear in the backup list, it goes to a blank screen and does nothing.

What is the command line for restoring a full backup please?

Thank you very much.
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
31
473
Go on, have a guess
You can use /scripts/restorepkg

Note the following from that script, though:
This feature will restore full backups, cpanel backups and cpanel move files in the format of:
cpmove-user.tar.gz, user.tar.gz, backup-date_time_user.tar.gz<br><br>
The files must be in one of these directories on the server:
/home,/usr/home,/web,/home2,/home3,/root,/usr<br><br><b>You must upload the file to one of the above locations before
using this feature.</b>
 
S

Secret Agent

Guest
I tried this and got:

/scripts/restorepkg global.tar.gz
Searching /home....
No Restorable archives found!
Searching /usr/home....
No Restorable archives found!
Searching /web....
No Restorable archives found!
Searching /home2....
No Restorable archives found!
Searching /home3....
No Restorable archives found!
Searching /root....
No Restorable archives found!
Searching /usr....
No Restorable archives found!
<br><br><b>No archives where found!!</b><br><br>
This feature will restore full backups, cpanel backups and cpanel move files in the format of:
cpmove-user.tar.gz, user.tar.gz, backup-date_time_user.tar.gz<br><br>
The files must be in one of these directories on the server:
/home,/usr/home,/web,/hom
 

madaboutlinux

Well-Known Member
Jan 24, 2005
1,051
2
168
Earth
Is the .tar.gz file is in the directories given in last line of your output ie. /home, /usr/home, /web. Copy the .tar.gz file you are trying to restore in one of those dir's using 'cp' command.

Also is the backup file is in format like cpmove-user.tar.gz? If it is not, the restore will fail.

Login to server and search the .tar.gz file.
cp /source/path/for/cpmove-user.tar.gz /home
/scripts/restorepkg cpmove-user.tar.gz