It looks like a bug to me -- running a console command makes a fake job with
JobId 0 whose status is never set, so it is reported as unknown.

The fact it sends a separate email is also bad.

I suggest reporting it (see https://www.bacula.org/support/bug-reporting/).

Using a script which runs bconsole looks like the only workaround.

__Martin


>>>>> On Fri, 25 Jul 2025 16:47:15 +0200, Saiful Bhuiyan said:
> 
> 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-dir 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.
> 
> 
> Regards,
> Saiful
> 
> On Fri, Jul 25, 2025 at 4:08 PM Martin Simmons <mar...@lispworks.com> wrote:
> 
> > The "term" here means "termination" so it isn't related to the terminal.
> >
> > What is the full contents of the email?
> >
> > __Martin
> >
> >
> > >>>>> On Fri, 25 Jul 2025 13:47:17 +0200, Saiful Bhuiyan said:
> > >
> > > Hi all,
> > >
> > > I have recently upgraded my bacula director from 9.4.2 to 13.0.4. Since
> > > then I’m seeing the following warning in Bacula job notification emails:
> > >
> > >   Bacula: Console Unknown term code of xxxxxx-fd
> > >
> > > This happens during our nightly catalog backup job, which includes
> > > `RunScript` blocks with several `Console =` commands, like:
> > >
> > >   Console = "prune expired volume yes"
> > >   Console = "purge volume action=all allpools storage=StorageStore1"
> > >   ...
> > >   Console = "purge volume action=all allpools storage=StorageStore7"
> > >
> > > The job itself runs fine, but this message appears in the mail report.
> > >
> > > I suspect Bacula is trying to output colored or terminal-formatted
> > content
> > > when there is no terminal (since this runs as a scheduled job).
> > >
> > > My current idea is to replace the `Console =` commands with wrapper
> > scripts
> > > that run `bconsole -n` (to disable colored output), but before I do that:
> > >
> > > - Has anyone solved this warning in a cleaner or more official way?
> > > - Is there a way to globally suppress formatted console output from
> > Bacula
> > > in scheduled/non-interactive jobs?
> > >
> > > ### System Details:
> > >
> > > - Bacula Director version: **13.0.4** on **Ubuntu 24.04**
> > > - File Daemon (`aegir-fd`) version: **9.4.2** on **Ubuntu 20.04**
> > >
> > > Any input would be greatly appreciated!
> > >
> > > Best regards,
> > > Saiful
> > >
> >
> 


_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to