
Originally Posted by
Kent Brockman
Hi there people. Today I were thinking about this feature, and recalled when sometimes a backup process collides with another heavy weight process in course, like mailman sending a ton of mails and the load balance reach a spike of 18 in just 2 minutes of work. I have arranged to setup well separated cron hours for these tasks, but just because I do know how to avoid those scenarios doesn't mean that a simple queue will save problems to underpowered servers or novice admins. I think that the backup queue should also take in account the current load of the server and automatically pause itself until the load slow down to a reasonably normal value (that could set in the Backup screen as "Max Load after which backups are paused"), and issue an email alert to the sysadmin if the load don't get normalized in X minutes (also, set in the Backup screen: "Max High Load Time Wait before issuing an alert").
What do you think?
Load control with pause already exist into the current backup process.
here's an example of custom backup script i run for a customer:
Code:
#!/bin/bash
BROOT="/backup/custom_backups/domain.com/"
BACKUPDIR="/backup/custom_backups/domain.com/`date +%Y-%m-%d`"
CPUWATCH=/usr/local/cpanel/bin/cpuwatch
MAXLOAD=6.0
USER="customer_username"
BACKUPSCRIPT=/scripts/pkgacct
$CPUWATCH $MAXLOAD $BACKUPSCRIPT $USER
sleep 20
mkdir -p $BACKUPDIR ; mv /home/cpmove-customer_username.* $BACKUPDIR
cd $BROOT && find -mtime +4|xargs rm -rf
So as you can see i can control the max load for the backup process. In this example if the server load is >=6 then the backup script will be paused until load will decrease.