On Friday 21 August 2009 09:07:48 Ralf Brinkmann wrote: > Quinton Jansen schrieb: > > Ralf Brinkmann wrote, On 08/19/09 23:20: > >> an unknown unreproducible error with the autochanger device left behind > >> lots of jobs with status code "C" (Created, but not running) blocking > >> all current jobs. > >> > >> My idea is to add a "RunBeforeJob"-script that ensures all expired jobs > >> are deleted from the job list before the actual backup starts. > >> > >> Has anyone a sample script? > > > I noticed a similar issue since the upgrade to 3.0.2. Eventually I > > found there was a long queue of jobs waiting to use a drive, without any > > tape.. The normal "BLOCKED waiting for..." message did not appear on > > the storage status display... > > Mounting a tape to the drive took care of the problem.. > > Bacula is version 2.4.2. > > One job was still running on the the autochanger with some delay - all > others seemed to be blocked. > > Restarting Bacula didn't help. When I deleted all the expired jobs with > status code "C" everything was fine again. > > -- > Ralf Brinkmann
I've got a script that checks and cancels hanging (CPU 80%+) jobs, and checks whether the job is a duplicate of a running/waiting one. I'll attach the script - you can then modify it to check and cancel your expired jobs :) BTW, the "run before job" script is executed when the job is executed (even when it then starts waiting for smth) - eg. the script won't run in case of BackupCatalog job, because it won't be executed until all other jobs are finished (as it has higher "priority"), so you have to be sure that jobs are not THAT blocked. -- Silver
check-job.sh
Description: application/shellscript
------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users