Does the backup script remove deleted accounts?

WebHostPro

Well-Known Member
PartnerNOC
Jul 28, 2002
1,715
28
328
LA, Costa RIca
cPanel Access Level
Root Administrator
Twitter
Sorry, what I mean is when an account is removed in CPanel. Does the new incremental back up script remove the back up or the removed account?

Or does it just leave the old account's back up even after the account is removed.

I use incremental backups to the back up partition.

Thanks
 

WebHostPro

Well-Known Member
PartnerNOC
Jul 28, 2002
1,715
28
328
LA, Costa RIca
cPanel Access Level
Root Administrator
Twitter
So the process would be too check the user names in the back up folder vs the usernames in the WHM?

What if you have 800 accounts, this would take hours to check right.

Is there someway to have these removed without checking all the accounts in the WHM? Maybe a time stamp or something to know the account is not active.

I'm really just confused a little, I guess my question then is:

What is the process to remove the back up folders for an account that is not in WHM anymore?

I have read the docs page and the back up page over and over, it says nothing about what I am asking. Not sure why you would try to send me there.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello :)

The amount of time the backup remains on the system depends on what you have configured for scheduling and retention. Backups are not stored in a single directory like they are on the legacy backup system. Instead, the backups are stored in directories named after the date of the backup generation (e.g. /backup/accounts/2015-11-23/). Those directories are removed when the retention period has been reached, and thus any accounts that are not available for backup in the most recent backup generation are not included in the new directory.

Thank you.
 

WebHostPro

Well-Known Member
PartnerNOC
Jul 28, 2002
1,715
28
328
LA, Costa RIca
cPanel Access Level
Root Administrator
Twitter
Hmm, I don't really underrstand, the backups on the server are on the folder:

/backup/incremental/accounts

And each one is within a folder after the username.

What I am asking if I remove the account out of CPanel (the account termination option)

How do I remove it from the back section?

Or does CPanel remove it.

I don't see any dates any where in the files names, are you sure about that?

I use incremental daily backups.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
The incremental backup option allows only for one backup at a time, and the retention settings are not applied as they are with standard backups. Terminating an account will not remove it from the incremental backup directory, and previously terminated accounts are not automatically pruned. You can manually remove the directories if you need to free up space. There's a response about why this is by design at:

purging of incremental backup

Thank you.
 

WebHostPro

Well-Known Member
PartnerNOC
Jul 28, 2002
1,715
28
328
LA, Costa RIca
cPanel Access Level
Root Administrator
Twitter
Thanks, yeah it would be great if there was a script that would simply sync the backups with the account that are live on the server.

It seems doable, I just am not a coder :(

Someone made this script before but it doesn't work with the new back up system.
ndchost.com/cpanel-whm/addons/cleanbackups/

Maybe they will make a new version for the new backup system, fingers crossed!
 
Last edited by a moderator:

WebHostPro

Well-Known Member
PartnerNOC
Jul 28, 2002
1,715
28
328
LA, Costa RIca
cPanel Access Level
Root Administrator
Twitter
I'm trying to do this with a server that has about 300 accounts now and it's so painful.

It would be easy to just have an option that allows you to purge removed account backups manually.

Than there is no risk removing needed data. You just wouldn't risk a full server restore with accounts not active anymore.

Otherwise you risk accounts on other servers being redirected from a restore and accounts that could be fraud or removed for personal reasons brought back to life on accident.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
You could hire a system administrator to develop a custom script that automatically removes backup archives for accounts that do not exist:

System Administration Services

Thank you.