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.

Terminate an Account but backup disk not delete

Discussion in 'Data Protection' started by Davec, Jul 20, 2007.

  1. Davec

    Davec Member

    Joined:
    Oct 16, 2004
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    Just noticed if terminate an account through whm. But still need manually remove the client's account in the mounted backup disk (By day, and week..etc).

    Anyone know if there is scripts or WHM has such functions which will remove everything.

    Thanks.
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,468
    Likes Received:
    196
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Does not remove them by default. There is a script someone made and it is posted on these forums but you'll need to dig around using the search tool to find it.
     
  3. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    The script can be found here...
    http://www.cplicensing.net/scripts.php

    Be careful with it. It does not do the delete at first, and without you making a edit in the script (well commented) but IIRC, running it will cause that nights cpbackup to not run for some reason.
     
  4. Davec

    Davec Member

    Joined:
    Oct 16, 2004
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    Thankyou for the information.

    Hope one day the WHM will have a function to remove the account completely.

    Dave
     
  5. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    I usually save termination notices and once a month or so, I will go through them and delete the backups. I like having them around as sometimes I found resellers may delete a wrong account only to discover this several days later or perhaps the client returns asking to resume they left off.

    So after a couple weeks, I officially delete the backup.
     
  6. Davec

    Davec Member

    Joined:
    Oct 16, 2004
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    Yes, I also do the same. I suspended the hosting account after it expired and remove all the folders after a month.

    But the process to manually remove all the folders in the backup is a bit of work. Especially where i have one backup on the server and one backup remote off-site.

    For those hosting companies which have over 10K hosting clients, surely it is not a efficient way to remove files.

    Hope the cpanel engineer see this thread and put a remove functions on the WHM.
     
  7. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    Those hosting companies with over 10k clients can afford unix admin help. :) Or they simply run large enough backup disks that it isn't an issue.

    You can achieve the same effect with a periodic manual command:
    Code:
    cd /backup/cpbackup && find . -type f -mtime +60 -print | xargs cat
    This will remove backups that are over 2 months old. You should of course first verify that your backups have worked in the last 2 months, otherwise this will remove ALL your backups (since they are all old). The version above doesn't actually remove, to do that replace "cat" with "rm".

    You could also use the new /scripts/postkillacct account to remove the backup when the account was deleted. I don't know why you'd do this though; the whole point of the backups is to allow you to recover from an accidental terminate!! In the thread on prekillacct/postkillacct I've posted a script that will do a final full backup when you terminate an account. Peace of mind at last, as we can now recover from an accidental terminate in minutes.
     
  8. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    Very nice suggestions Brian. Space is definitely not premium so yes, whats the rush to delete.
     
  9. freedman

    freedman Well-Known Member

    Joined:
    Feb 13, 2005
    Messages:
    312
    Likes Received:
    1
    Trophy Points:
    18
    Brians suggestion is a good one.. it's also nice when people's accounts terminate and you can charge them a 'data recovery' fee.

    and Verndon:
    the reason that nights backup wont run is that anything you do to the backup area's changes the date on the directories.

    cpanels backup script checks these dates to decide if it need to be run or not.

    ideally, anything that 'purges' anything old from the backup folder should save the last mod date on /backup/cpbackup/{daily,weekly,monthly} and touch them back when it's done.
     
  10. SonServers

    SonServers Well-Known Member

    Joined:
    Oct 24, 2001
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    6
    I just have a simple little script that is run every morning that rotates daily backups. This lets me keep the last three days available in case a customer needs to go back more that just last night. Many times, it has really helped a customer to be able to restore two or three days back.

    Because of that rotation, the closed account backups get deleted after three days.

    If a customer requests the account be closed, I expect they have what they need and I let their backups delete in the rotation. If I have to close an account due to non payment, I then move their backup file to a special "closed" directory and hang on to it for a few months just in case they come back and want it set back up.
     
Loading...

Share This Page