On 9/10/24 5:21 AM, Bruno Bartels \(Intero Technologies\) via Bacula-users wrote:
Hi alltogether,I have adjusted Bacula to cancel jobs, that are duplicates of one job (Disable "AllowDuplicateJobs", or "DisableDuplicateJobs" AND "CancelQueedDuplicates, which should be the sameim my understanding).The reason for this is, that there are running some really big full backups, that take few days to finish, and meanwhile there is the possibility, that the same job can start in a lower level(incremental/differential) This works fine, except one problem: When the new job gets canceled there is this error thrown in the logs:Fatal error: JobId XXX already running. Duplicate job not allowed. And Bacula is sending out a mail. Question: Is there possibility not log this as FATAL ERROR? I want to receive mails concerning fatal errors, so setting the message ressources isn't a option. Can you please help? Thank you in advance
Bruno
Hello Bruno,You cannot do this the way you are currently trying because as you have seen, Bacula will cancel the job, and it will show up as a "non good" (canceled) job in the catalog, and you will get the failed job email.
Fortunately, there is a new feature which was added recently that should solve this issue for you.It is called 'Run Queue Advanced Control' which adds a new "RunsWhen" setting for your job Runscripts. The new setting is "RunsWhen = queued"
The idea is that instead of using the AllowDuplicateJobs, DisableDuplicateJobs, and CancelQueedDuplicates job options to control if a job is allowed to be queued/started, you add a RunScript{} stanza to your job, set the RunScript's "Runswhen = queued", and have the RunScript's "Command =" setting point to a custom script (we have examples).
The script's returncode/errorlevel will determine whether the job enters the queue, or is just dropped and forgotten about - producing no canceled jo
b, and no job error email. Using this new advanced "RunsWhen = queued" level, you should be able to accomplish what you are looking to do: - Prevent same jobs from being queued when the same job is already running - Prevent duplicate jobs from being canceled and error emails from being sent. This new feature is available since Bacula Community version 15.0.x, which closely tracks Bacula Enterprise v16.0.x. It is documented here in the Enterprise manual: https://docs.baculasystems.com/BETechnicalReference/Director/DirectorResourceTypes/JobResource/index.html#job-resource The section you are looking for is named: "Notes about the Run Queue Advanced Control with RunsWhen=Queued" Please make sure you are running Community version v15.0.2 first, then give this a try and let me know if this helps. Best regards, Bill -- Bill Arlofski w...@protonmail.com
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users