Re: needed tapes

Bill Arlofski via Bacula-users <[email protected]>
Newsgroups gmane.comp.bacula.user
Message-ID <[email protected]>
On 3/11/25 1:29 PM, Dragan Milivojević wrote:
> You are basically asking if someone can transfer your thought process and
> reasoning into a custom script. Unless there are mind readers here ;) that is not
> going to happen. Describe your selection process in an algorithmic way and transfer
> that into a bash shell. If you are adventurous try ChatGPT, with proper corrections it
> will be able to construct the script for you.


I have to mainly agree with Dragan's assessment above.


Here's why:  When you do a `status director` you will see the Scheduled Jobs listing near the top.

Next to each upcoming job, there is a volume that Bacula has "guessed" will be needed/used. "Guessed" is my term. :) 
Obviously, the Director arrives at these volumes via DB queries. :)

Here's why I say "guessed":

Let's say an Incremental job is scheduled/listed, and so, Bacula shows that some volume from the Incremental pool should be 
used. So far, so good. And so, you plan to have that tape available on that night.

BUT, for some reason (Fileset edit without "IgnoreFilesetChange = yes" setting in it, a Job's "MaximumFullInterval" setting 
passes between when you choose a volume and when the job starts, a Schedule's Pool override, etc, etc, etc) occurs to upgrade 
this scheduled Incremental job into a Full Job...

Now, when the job runs, a volume from the Full pool is needed (specified by the one of the above, or the "FullBackupPool" 
override in the job) and you are stuck with an Incremental volume that Bacula does not want, while it waits and asks for an 
appendable volume from the Full pool.

Your request seems practically (in the literal sense of the word) almost impossible based on the complexity and flexibility 
that Bacula tries to manage with all the things that can occur to override an expected (by the end user) behavior before the 
time of the behavior occurs.

Having said all of the above, if you have a tape library, something can possibly be done to provide a *list of tapes* that 
are past their retention periods and are available. Once these tapes are inserted, a `status slots` will let Bacula know 
which ones are "inchanger" so, eligible to be selected for a Job, and Bacula would/should be happy with what is available to 
it when the Jobs run.

The list of tapes generated would have to include some Full and Inc tapes to mitigate the issue(s) I described above, and of 
course and of this really requires a tape library...

*note* After writing the above, I just realized that if you configure a Scratch pool, and add the `ScratchPool` and 
`RecyclePool` to your Full and Incremental pools to point to this specific Scratch pool, *any* tape in the Scratch pool is 
eligible for either a Full or Incremental backup and will be pulled from Scratch into the correct Full or Incremental pool at 
the time bacula requests it.

The final thing to consider in the query and script to be written is Appendable/Purged volumes already existing in the Full 
and Incremental pools and to consider them first.

So, after reviewing your small-ish environment with a small-sih (8 slot loader), I am sure "something" can possibly be done, 
but with all the caveats mentioned above. Who knows... Maybe this is something that will keep me busy in my next few evenings. :)

To be fair, this is a bit of a complex task to "get right" and have it be "reliable" - and there are surely 100 other things 
I didn't remember to include above. :)


Best regards,
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

wsCpBAEBCABdBYJn0JjCCZBIDTDab9XDQDUUAAAAAAAcABBzYWx0QG5vdGF0
aW9ucy5vcGVucGdwanMub3JnMsa+gRj1gbPhKvSIXw/lURYhBMuLnlBaSQiu
SUbb6UgNMNpv1cNAAAB8xgf+KtcLQVio5RKY3jS/guP2tzHhuVaXHPcfOudr
/S9PT4ZkFJ43N+SRA3IfvzR3rZyY2ZDMHhsSRs0xCSQYI/rHiKgPwZsI07wz
nG10ZhAyFYAUv4E9Qw11F5Sh9klTowBkZBgo6BiNxZ/sUrnCEVsA7zTVZ2SS
gWQJNSegmFgHWIEuQUffcjn7cUDMHZl+KA3sc6qQTmIIyPqshg4bGpl+j2Ij
UwTwtRzgbdF2G31x/b4ZXGigZpG+p6/pcRMa1czyGgWdQxuItQwheTnh6HIF
f0AXO14IAl/WG+mmRQLm1ynqrekHxFeJBL6Yvd8VW/AzabJGF7CbuY2Ow3F5
hlJvRg==
=HvGv
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.