Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Does the backup script remove deleted accounts?

Discussion in 'Data Protection' started by WebHostPro, Nov 21, 2015.

  1. WebHostPro

    WebHostPro Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,654
    Likes Received:
    15
    Trophy Points:
    318
    Location:
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,436
    Likes Received:
    416
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. WebHostPro

    WebHostPro Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,654
    Likes Received:
    15
    Trophy Points:
    318
    Location:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,896
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. WebHostPro

    WebHostPro Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,654
    Likes Received:
    15
    Trophy Points:
    318
    Location:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,896
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. WebHostPro

    WebHostPro Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,654
    Likes Received:
    15
    Trophy Points:
    318
    Location:
    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!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #7 WebHostPro, Jan 18, 2016
    Last edited by a moderator: Jan 18, 2016
  8. WebHostPro

    WebHostPro Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,654
    Likes Received:
    15
    Trophy Points:
    318
    Location:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,896
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice