Restoring Accounts from Incremental Backups

dstana

Well-Known Member
Jul 6, 2016
109
19
68
Phoenix, AZ
cPanel Access Level
Root Administrator
Hello,

I was looking over the incremental backups feature and I'm trying to determine if it's right for us. Obviously it would save a lot of space, however, certain accounts on the server need to be reverted to a previous state on a semi-regular basis.

Here's a scenario: We have daily incremental backups set to run daily. On Wednesday, we notice an issue and need to revert to the backup taken Monday. Will incremental backups allow us to restore to a previous point like a daily compressed backup will? With daily compressed backups, we could remove the account from the server and restore Monday's backup. Will this work the same way with incremental backups?
 

cPanelMichael

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

Yes, multiple incremental backups are supported as of cPanel version 64. You'd be able to restore Monday's backup in your scenario as long as you are retaining three or more daily backups (Monday through Wednesday in your scenario). You can read more about backup retention settings at:

Backup Configuration - Version 66 Documentation - cPanel Documentation

Thank you.
 

brt

Well-Known Member
Jul 9, 2015
105
10
68
US
cPanel Access Level
Root Administrator
cPanelMichael completely missed the question, and I'd like the answer too.

With zipped backups, you could completely delete an account and upload the backup.tar.gz and click restore and be done.
What's the process with incrementals -- rebuild the account by hand?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
With zipped backups, you could completely delete an account and upload the backup.tar.gz and click restore and be done. What's the process with incrementals -- rebuild the account by hand?
You can restore incremental backups the same way. Simply ensure incremental backups are enabled in "WHM >> Backup Configuration" and the "Backup Restoration" option can detect the incremental backup directory for the account. Or, if you have the incremental backup directory stored elsewhere, you can manually restore it using a command like this:

Code:
/scripts/restorepkg /path/to/inremental/user/
Thank you.
 
  • Like
Reactions: brt

tui

Well-Known Member
Jun 15, 2007
145
40
78
Mexico
cPanel Access Level
Root Administrator
This is insane...

Remote incremental backups are the best thing, but cPanel should have released a restore from remote backups feature at the same time as incremental remote backups, without this, restoring backups using incremental remote backups is now a problem:

Move cpfile.tar.gz files between servers is easy and in a some way fast, but remote incremental backups does not create the archive, so you need to ssh to backup server, choose folder, create a .tar.gz file from desired folder, wait for archive to end (usually the backup servers have very few cpu and memory resources), move file to cpanel server, create the format BACKUPDIR/date/account, untar file, restore account, delete uncompressed folder on cPanel server, delete .tar.gz on cPanel server and delete .tar.gz from backup server... very annoying.

Now, having the benefit of the remote incremental backup where files are not stored in a .tar.gz archive there would be easy to retrieve/restore single files, full directories, mails, etc. from cPanel interface (by end-user).

The transfer tool is already done, this feature should work the same way that transfer tool does.

This is something that 3rd party backup tools do for a very long time
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Move cpfile.tar.gz files between servers is easy and in a some way fast, but remote incremental backups does not create the archive, so you need to ssh to backup server, choose folder, create a .tar.gz file from desired folder, wait for archive to end (usually the backup servers have very few cpu and memory resources), move file to cpanel server, create the format BACKUPDIR/date/account, untar file, restore account, delete uncompressed folder on cPanel server, delete .tar.gz on cPanel server and delete .tar.gz from backup server... very annoying.
You don't actually have to generate a .tar.gz archive. You could move the backup folders back to the cPanel server and restore the accounts using the steps in the following thread:

How can I restore multiple accounts from cPanel backups (v.2)

That said, I do see your point that even moving the directories themselves can take some time. For reference, here's the corresponding feature request for anyone else that would like to vote for it:

Restore from remote backups

Thank you.