Re: "Console Unknown term code of [fd]" error during scheduled job
Bill Arlofski via Bacula-users <[email protected]>
| Newsgroups | gmane.comp.bacula.user |
|---|---|
| Message-ID | <[email protected]> |
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
[email protected]
_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users
signature.asc
(application/pgp-signature, 583 B)
-----BEGIN PGP SIGNATURE----- Version: ProtonMail wsCpBAEBCABdBYJohD4GCZBIDTDab9XDQDUUAAAAAAAcABBzYWx0QG5vdGF0 aW9ucy5vcGVucGdwanMub3JnaJbqk2dxtAUbuNZtZxjdxxYhBMuLnlBaSQiu SUbb6UgNMNpv1cNAAACEnAf8DVlKSui0Tl56HadI6PzFGE5FvWz3bDL4+1RR gXtC2RV3wfF4pkS5EPhGOQcFckCvD8H6sY8AgkK14TNghOfD6VXsK1qTrT0d h9Ey1sHIfkPEu+itQ6Rt5bwkL7negRdq7KNl174jCpgPdNqMUJHj4LoH2i0G 4RgRQVwbmHfiu+uCL/JTCsSlMsfesQilEmawmAQw5Vh0BwALdn752nHyUddc svKGoeVVJthvjzy9npmC/UYYDMapJ3/rRDmaiBb42WmPKEdKFx//ng+0TsI8 NjcH4DKAGTY5YWgL2y5OLwMkhe7AnDxsCu4R+zac//luU/OmV/SpAIqFf1kz MAQ50w== =7dAt -----END PGP SIGNATURE-----