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.

Anyway to limit the complete backup function?

Discussion in 'General Discussion' started by zigzam, Nov 6, 2006.

  1. zigzam

    zigzam Well-Known Member

    Joined:
    May 9, 2005
    Messages:
    206
    Likes Received:
    0
    Trophy Points:
    16
    Im currently having issues with users backing up 5 Gb sites during peak hours causing the server load to sky rocket. Or users backing up 20 sites at once causing high load.

    Is there a way to limit when the complete backups can be made? or if one is running not have another start until the first finishes.

    If there isnt a way, how can I disable that function?
     
  2. eth00

    eth00 Well-Known Member
    PartnerNOC

    Joined:
    Mar 30, 2003
    Messages:
    723
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    NC
    cPanel Access Level:
    Root Administrator
    Short of a script that chmod 000's the cpbackup file and having the users get an error there is not a way.

    You can disable it somehow in WHM, I forget exactly probably tweak settings.
     
  3. panayot

    panayot Well-Known Member

    Joined:
    Nov 18, 2004
    Messages:
    125
    Likes Received:
    0
    Trophy Points:
    16
    I have the same problem. I was thinking to put a cronjob that turns off backup feature in cpanel during the day and restores it at night.

    The file to edit with the two cronjobs would be /var/cpanel/features/disabled

    Then edit backup=1 <-> backup=0 with cron.

    I am not sure if it would not be better to just force them to use ftp to backup files. But I do not know how to disable other backups and leave only database backups.
     
  4. 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
    Another option might be to simply put some more memory into your server, as it's usually memory starvation that makes the load skyrocket on backups, from personal experience.
     
  5. zigzam

    zigzam Well-Known Member

    Joined:
    May 9, 2005
    Messages:
    206
    Likes Received:
    0
    Trophy Points:
    16
    It has 2 GB Ram and never goes over 1 GB. It doesn't matter how much ram you have when someone starts five 2 GB backups at once.
     
  6. 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
    Impossible to argue with that :) Although I think you'll find the memory use gets pretty high with numerous backups running at once.

    You might be able to replace cpbackup with a perl script that uses semaphores to prevent more than a certain number running at once, then calls the real cpbackup. That should work well, although you'd have to guard against the script being overwritten. Or another mechanism would be to queue the backup and have another process run backups from the queue one after the other. Still simpler is to do as you've proposed and just turn off backups completely or during certain hours.
     
Loading...

Share This Page