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.

Disable suspened account backups

Discussion in 'Data Protection' started by sshdll, Aug 30, 2009.

  1. sshdll

    sshdll Registered

    Joined:
    Nov 12, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Hi all,

    Could you please explain which (user-specific) configuration file(s) does the following WHM feature alter when used:

    WebHost Manager -> Configure Backup -> Select Specific Users -> 'Select >>' -> un-check the box for given user and save.

    By default all available users on the hosting server would be selected for backup.

    Basically, I need to lower the disk utilization on the backup servers. I am in the middle of writing a small bash scripts whose tasks in generally are to generate a list of all users which are suspended for more than, say 30 days for every cPanel hosting server and then remove the daily and weekly backups for these users from the backup server.

    However, as by default suspended accounts are also considered by cPanel/WHM for backups, doing the above would not make much sense :(

    My aim is to, if possible, get the script to also prevent backups for suspended accounts instead of doing it manually for each user..which of course is not much of an option :)

    Thanks for your time,
    All the best.
     
  2. MattCurry

    MattCurry Well-Known Member

    Joined:
    Aug 18, 2009
    Messages:
    275
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Houston, Tx
    Disable suspended account backups

    Hello,


    I did review your question and what you are asking is unfortunately not going to be implemented in cPanel anytime soon. It will make backups of suspended accounts for sure. The only way to achieve this is to delegate what the users can back up. I hope this answers your question, please feel free to ask if you have any more.

    Thank you,
     
  3. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    User accounts listed in /etc/cpbackup-userskip.conf will be skipped during backup. Accounts that are currently suspended can either be added to that file manually, or by using the interface in WHM >> Backup >> Configure Backup >> Select Specific Users

    For future users, create the file /scripts/postsuspendacct and make it executable. Some information about using this file is here ScriptHooks < Archive < TWiki

    The gist is you have the postsuspendacct script add the suspended user to /etc/cpbackup-userskip.conf. You might want to make the corollary /scripts/postunsuspendacct file to remove an account from /etc/cpbackup-userskip.conf upon account unsuspension.
     
  4. sshdll

    sshdll Registered

    Joined:
    Nov 12, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Great..no - BRILLIANT :) !

    Many thanks for the supplied information..and my apologies for not seeing the obvious before asking!

    I might post the scripts once I get some time to test everything.. in case this may save some time to anyone.

    All the best!
     
Loading...

Share This Page