I suppose that would be a very thorough way to ensure no records remain.
Remember that I am not 100% certain about what those commands do, and that
others here may have more wisdom.

I have read in the docs somewhere about a way to get Bacula to reuse a tape
that had been previously used before Bacula would usually do such a thing.
By default I believe Bacula's behavior is to overwrite previously written
data on a volume as an absolutely last resort (when that data has been
previously expunged). Somewhere in the docs someone reported learning that
they could rewind the tape, then write a record to the beginning of the
tape that would signal to bacula that the tape was unused. Maybe writing an
EOF marker? Check the docs. You would do this thing I describe to get
bacula to use the whole tape sooner than it would usually do so.

Now, I don't know for sure that you're using tapes. Could be file volumes.

Robert Gerber
402-237-8692
r...@craeon.net

On Wed, Sep 27, 2023, 3:54 AM Felix Brack <f...@ltec.ch> wrote:

> Hello Robert,
>
> Many thanks for the fast response!
>
> On 26.09.23 17:36, Rob Gerber wrote:
> > My guess is that purge volume=xyz will purge any records regarding that
> > volume. However, purge jobs volume=xyz will purge any jobs related to
> > that volume, but not the volume itself.
> >
> > I have learned from this list that there are retention periods for
> > records pertaining to files, jobs, and volumes. This implies that bacula
> > considers database entries regarding files, jobs, and volumes to be
> > separate from each other. As a result, I am not sure that purging a
> > volume record would remove all associated file and job records from the
> > database as well.
> >
> > I would say with some confidence that purge jobs volume=xyz will purge
> > job records related to volume xyz, but might not purge file records
> > related to that volume, and almost certainly won't purge volume records
> > related to that volume.
> >
> So, to make manually sure nothing prevents volume xyz to remain in
> 'used' state or turn back to 'used' state after one single job, it would
> be best to enter _all_ of the following commands:
>
> purge volume=xyz
> purge jobs volume=xyz
> purge files volume=xyz
>
> > Keep in mind that purging one record might result in Bacula removing
> > other records automatically. Like maybe if a volume has no jobs or files
> > associated, the volume might be pruned and recycled automatically. I
> > don't know if Bacula does this, but it's plausible.
> >
> > Keep in mind that purge is dangerous and ignores configured retention
> > periods. Prune is safer.
> >
> Thanks for the tip. I use purge intentionally to bypass the configured
> retention policy.
>
> regards Felix
>
> > Those who are more knowledgeable should be able to contribute more.
> >
> > Robert Gerber
> > 402-237-8692
> > r...@craeon.net <mailto:r...@craeon.net>
> >
> > On Tue, Sep 26, 2023, 6:58 AM Felix Brack <f...@ltec.ch
> > <mailto:f...@ltec.ch>> wrote:
> >
> >     Hi,
> >
> >     What is the difference between:
> >
> >     purge volume="xyz"
> >
> >     and
> >
> >     purge jobs volume="xyz"
> >
> >     Or are they equivalent with respect to the result?
> >
> >     regards Felix
> >
> >
> >     _______________________________________________
> >     Bacula-users mailing list
> >     Bacula-users@lists.sourceforge.net
> >     <mailto:Bacula-users@lists.sourceforge.net>
> >     https://lists.sourceforge.net/lists/listinfo/bacula-users
> >     <https://lists.sourceforge.net/lists/listinfo/bacula-users>
> >
>
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to