Prevent cpbackup run during the day.
Hello
Is possible Prevent cpbackup run during the day? Similar to cpanellogd
Generate backups during the day raises much server load.
Thank you
Marcelo
-
I found something. for example kill -STOP (pause execution) kill -CONT (resumes execution) I will try to create a script to run in cron in order to pause and resume the backup. If you have suggestions, please share Thank you Marcelo 0 -
Hello the script is ready. :D The use of the script is at your own risk. ;) I installed in /usr/local/bkptime 1) pause backup script Save to a file (i.e. pause) and put permission 755. Configure cron to the day/hour you want to pause the backup. rm -rf pidbackup rm -rf pids ps -x > pids grep /usr/local/cpanel/scripts/cpbackup pids > pidbackup us=`cut -c1-5 pidbackup` kill -STOP $us
2) resume backup script Save to a file (i.e. resume) and put permission 755. Configure cron to the day/hour you want to resume backup.rm -rf pidbackup rm -rf pids ps -x > pids grep /usr/local/cpanel/scripts/cpbackup pids > pidbackup us=`cut -c1-5 pidbackup` kill -CONT $us
Thank you Konrath0 -
The time cpbackup runs you can set in root's crontab: as root do: crontab -e you see a line like: 45 4 * * * /usr/local/cpanel/scripts/cpbackup meaning cpbackup runs every night at 4:45 Change the time and save. 0 -
Hello This script is to pause and resume the backup. 0 -
[quote="konrath, post: 1515201">Hello This script is to pause and resume the backup.
If you can change the cron time to run backups at night, instead, why would you want to pause and resume it?0 -
[quote="Infopro, post: 1515272">If you can change the cron time to run backups at night, instead, why would you want to pause and resume it?
Because the backup can invade the day. Then you can pause at 6 am and return the next night. This script is for you to pause the backup after a certain time. If the backup starts at midnight and take 12 hours to complete, you can pause at 6 am and return next morning.0
Please sign in to leave a comment.
Comments
6 comments