The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Does the backup script remove deleted accounts?

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

  1. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    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
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,470
    Likes Received:
    197
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  3. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    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.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  5. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    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.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  7. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    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!
     
    #7 DWHS.net, Jan 18, 2016
    Last edited by a moderator: Jan 18, 2016
  8. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    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.
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page