legacy backups restore on new vps

enxdtw

Registered
Aug 31, 2015
3
0
1
Germany
cPanel Access Level
Root Administrator
Hi

I created a whm legacy backup by running the command

sudo /scripts/cpbackup --force

Since I choose the mysql and dir settings for all accounts I also backed up the user accounts

The backup created backup files in /backup/cpbackup/daily including some tar.gz files for each of the user directories.

./ calendar.tar.gz dirs/ ines.tar.gz
../ cpbackupstatus.cfg eject.tar.gz simon.tar.gz
altona.tar.gz dave.tar.gz files/

My question is how do I restore using these files on my new VPS server, I guess I copy the files to the /backup/cpbackup/daily on the new server, however how do I restore, will WHM recognise the files in the directory, which settings page do I need to use and what do I put in the restore fields?

Thanks

Dave
 

24x7server

Well-Known Member
Apr 17, 2013
1,911
96
78
India
cPanel Access Level
Root Administrator
Twitter
Hello,

Yes, You can restore your all these backups through WHH. Login your new VPS and enable your legacy backup. Once you enable it you can restore your all backup through WHM >> Backup >> Legacy Restore Multiple Backups

Also you can restore your backup through command line using "/scripts/restorepkg /backup/cpbackup/daily/FILE-NAME.tar.gz" command.
 

enxdtw

Registered
Aug 31, 2015
3
0
1
Germany
cPanel Access Level
Root Administrator
Hello,

Yes, You can restore your all these backups through WHH. Login your new VPS and enable your legacy backup. Once you enable it you can restore your all backup through WHM >> Backup >> Legacy Restore Multiple Backups

Also you can restore your backup through command line using "/scripts/restorepkg /backup/cpbackup/daily/FILE-NAME.tar.gz" command.
The thing is that there is no single FILE-NAME.tar.gz in the directory backup/cpbackup/daily, there are compressed files for all the individual accounts and also a dir and file directory. Can you explain how this technique would work?

I am hoping that the 'Legacy Restore Multiple Backups' is able to find and use the /backup/cpbackup/daily directory. So my plan is to ftp the /backup directory to the new VPS and then perform the backup using the Legacy Restore Multiple Backups technique. However I would like an alternative in the case that whm is unable to find the backup or complains about restoring from it.

Cheers

Dacve
 

24x7server

Well-Known Member
Apr 17, 2013
1,911
96
78
India
cPanel Access Level
Root Administrator
Twitter
Hello :),

Using for loop in your command you can restore your all backup files.You can save a list of full paths of each backup in a text file. For example at "/root/list_of_backups.txt" and then try with below command

Code:
for i in `cat /root/list_of_backups.txt`; do echo /scripts/restorepkg $i; done;
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
Hello :)

Yes, you could restore the backups through a command like the one in the previous response if you prefer to not use Web Host Manager.

Thank you
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
New it seems that the whm backup process does not restore certain linux system files, for instance the sudoers file was reset, is this correct?
The backups generated through the options in "WHM >> Backup Configuration" are designed to restore the accounts. Only certain system files are backed up, and those are only restored manually:

cPanel - System Backups

Thank you.