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.

Pre-hooks or similar for cpanel backups

Discussion in 'cPanel Developers' started by jtopjian, Jun 5, 2009.

  1. jtopjian

    jtopjian Member

    Joined:
    Mar 8, 2009
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    Does anyone know of a solution where we could selectively disable certain users from running full home backups either by username, disk used, etc?

    We are running into issues where customers will have 25+gb of data and when they back everything up, it doubles the size on disk. Repeated uses of this either by the same customer or multiple customers on the server fills up our drives extremely fast.

    Any input is appreciated.

    Thanks
    Joe
     
  2. chinmay

    chinmay Well-Known Member

    Joined:
    Jul 22, 2008
    Messages:
    101
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    localhost
    Hi Joe,

    Do you want to exclude some users from the backups (backups configured from WHM) ?
     
  3. jtopjian

    jtopjian Member

    Joined:
    Mar 8, 2009
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    We're more looking for a way to prevent someone from running their own backups through cPanel / Backup Wizard.

    Thanks
    Joe
     
  4. chinmay

    chinmay Well-Known Member

    Joined:
    Jul 22, 2008
    Messages:
    101
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    localhost
    Yes, you can disable the Backup Wizard and Backups for the account. Access the option Feature Manager from the WHM, you will get the 2 feature lists (default and disabled). Edit the disabled list and uncheck the options Backup Wizard and Backups. Now you will need to edit the package for the domain you want the backup option to be disabled. Now Edit the Package for the account and change the current Feature list to disabled. Now re-assign the package for the account. You are done. Backup Wizard and Backups option will be disabled for the account. You can verify by accessing the cPanel for the account.

    I hope this is what you wanted ;)
     
  5. jtopjian

    jtopjian Member

    Joined:
    Mar 8, 2009
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    Thanks for the reply and for the details. This is one way we could go about doing this.

    I was hoping to find a more programmable way, though, and one that would not have to interfere with packages.

    I know cPanel and WHM have a lot of pre- and post- hooks where you can write scripts that will run prior to something running. I was wondering if there is such a hook that is run before the user runs the Backup Wizard or fires off a full backup of their site.

    Thanks
    Joe
     
  6. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    See below post. Nick is correct, Custom Event Handlers can be used with API1. I was thinking of hooks instead when making this post originally.
     
    #6 cPanelDavidG, Jun 8, 2009
    Last edited: Jun 9, 2009
  7. jtopjian

    jtopjian Member

    Joined:
    Mar 8, 2009
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Thank you for the detailed reply! That explains a lot on the background of this issue.

    I think I have come up with a solution that I'm going to test: I've created a cpanel theme tag/function out of a Perl module that will check how much space the logged in user has used. If it's under a certain amount, it will display the backup form as normal.

    Thanks again!
     
  8. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
  9. jtopjian

    jtopjian Member

    Joined:
    Mar 8, 2009
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Hi Nick,

    Thank you very much for this. This is brilliant. This might work out better for my problem, but if it doesn't, I'm sure I can find several other uses for the custom event handler.

    One questions I have about it is what will the user see if an action is denied? Is there a way to report a message to the page? Can we redirect to a global error page or something like that?

    Thanks
    Joe
     
  10. Jdolson

    Jdolson Registered
    PartnerNOC

    Joined:
    Feb 6, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    I just want to disable the backup wizard, i tried this, and it did not work, the icon still shows up in cpanel, and functions just fine is there some way else?
     
  11. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Actually, it should work -- but like you said, it does not. Please feel welcome to report this so we can follow up with you as this issue becomes resolved. Feel welcome to mention this forum thread in your report.

    You can report this issue at: https://tickets.cpanel.net/submit/index.cgi?reqtype=bugreport
     
Loading...

Share This Page