On 7/25/25 8:47 AM, Saiful Bhuiyan wrote:
Hi Martin,I receive about 16 emails with the same subject daily. I am sharing the first and last mail. The full email looks like this: 25-Jul 00:40 bacula-dir JobId 0: Automatically selected Catalog: BaculaBackupCatalog 25-Jul 00:40 bacula-dir JobId 0: Using Catalog "BaculaBackupCatalog" 25-Jul 00:40 bacula-dir JobId 0: Found 1 Job(s) associated with the Volume "Vol-Store2-7269" that will be pruned 25-Jul 00:40 bacula-dir JobId 0: There are no more Jobs associated with Volume "Vol-Store2-7269". Marking it purged. 25-Jul 00:40 bacula-dir JobId 0: Found no Job associated with the Volume "Vol-Store2-7264" to prune 25-Jul 00:40 bacula-dir JobId 0: There are no more Jobs associated with Volume "Vol-Store5-10687". Marking it purged. 25-Jul 00:40 bacula-dir JobId 0: 47 expired volumes found 25-Jul 01:09 bacula-dir JobId 0: Automatically selected Catalog: BaculaBackupCatalog 25-Jul 01:09 bacula-d
ir JobId 0: Using Catalog "BaculaBackupCatalog"
25-Jul 01:09 bacula-dir JobId 0: Using Catalog "BaculaBackupCatalog" 25-Jul 01:09 bacula-dir JobId 0: No Volumes found to perform the command.
Hello Saiful, You are getting these emails from the Director. Check your Director's config, typically the Messages{} resource block will be named "Daemon"...Since commands called by the `Console = ` option in Job RunScripts have no jobid associated with them, they will be shown as coming from (or being associated with) "JobID 0"
It is strongly recommended to use the RunScript's `Command =` option instead and call a script in which you can pipe the commands to bconsole like:
----8<---- echo "prune pool=whatever storage=whatever ..." | bconsole ----8<----The benefit of calling a script is that you can control the order of the console commands issued. The order of Runscripts configured in a Job are not guaranteed., and neither are the order of multiple `Console=` com
mands in a RunScript. Additionally, when using a script in a `Command =` line rather than the `Console =`, any output to stdout sent by the script(think: echo "Now pruning volumes", or whatever customized status messages you would like to see) will be printed in the correct joblog, with the correct JobID, and will appear in the log table so that `ll joblog jobid=xxxx` will show all output from your script as well as the output from the piped bconsole commands that your script calls.
Jobid 0 does not appear in the catalog, so you will never see anything with `ll joblog jobid=0` which as I mentioned is what JobId `Console = ` commands are associated to.
This will instantly stop all of those emails reported by the Director with Jobid 0 you are getting. Hope this helps, 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