On Monday 12 June 2006 10:40, Robert Wirth wrote:
> Hi!
>
> I've got two LTO-3 drives and with one autochanger device. Backups of
> dozends of clients into several pools works well, in general. My Bacula
> version is 1.38.7.
>
> There remains one annoying problem:
>
> I've defined a pool with two tapes for daily snapshot backups of
> some data of temporary interest from several clients.
> For simplicity, all snapshot jobs are defined identically.
> As a consequence, they all have the same start time.
>
> The idea is, that Bacula uses the first tape, until it's full,
> then continues with the second tape.
> The retention periods are choosed in a way that, when the second
> tape will be completed (Full, Used etc), all data on the first tape
> will be out of time, thus the first tape can be recycled automatically.
> And the other way round...
>
> But, good idea -- bad conversion:
>
> Bacula uses the tapes in an arbitrary order.
I don't think that the above is true. See below.
> Some day, only one tape is used. Another day, both tapes are used.
Well, you have not shown this, and depending how many jobs you run, and what
tape is currently in the drive, this could be perfectly normal.
> As a
> consequence, when tape recycling is needed some day, both tapes
> will contain actual backup data.
>
> F.i. have a look at the actual situation (the jobs start daily at 20:05 pm,
> using the same Schedule and JobDefs)
>
>
> Pool: Snapshot
> +---------+-----+-----------------+----------+-----+---------------------+
>
> | MediaId | ... | VolBytes | VolFiles | ... | LastWritten |
>
> +---------+-----+-----------+-----------------+----------+-----+---------+
>
> | 54 | ... | 497,058,209,311 | 520 | ... | 2006-06-09 20:14:29 |
> | 86 | ... | 110,145,463,630 | 115 | ... | 2006-06-09 20:19:40 |
>
> +---------+-----+-----------------+----------+-----+---------------------+
>
> You can see: Tape 54 (the first in pool) is used mostly, but not
> exclusively, although the tape is still in Append state.
>
>
> I can't find a hint whether/how I can Bacula instruct to use the volumes
> of a pool consecutively. I'd expect that this would be the default
> behaviour, but, obviously, it's not.
I think the basic problem is that there is really no definition of
"consecutive". I suspect that by consecutive, you mean in the order that you
see the volume list printed, but that order is "in general" totally arbitrary
and depends a bit on the whims of the underlying database engine and what
method of indexing you choose.
The whole issue starts to become emensely complicated if you consider that a
volume can be moved from one pool to another, and that when a Volume is
renamed (if I am not mistaken), the old volume record is deleted and a new
one is created.
Basing "consecutiveness" on MediaId will not work very well as the SQL gurus
can confirm since the MediaIds are not guaranteed to be consecutive. In
fact, if you ever delete any volumes, in most SQL engines (e.g. like MySQL),
the next volume created will take on the lowest free MediaId.
>
> Is there any solution with Bacula?
I don't think there exists any current solution because you have not precisely
defined the problem.
Bacula does have a very well defined algorithm (though quite complex depending
on the circumstances such as what volumes are currently in use) for
determining what the next volume will be. It is possible that this algorithm
can be improved, refined, or even made more predictable, but IMO any attempt
to "guess" or to "know" what the next volume to be used is destined to fail
at some point.
I suggest you rethink what you are doing and try to find a way to let Bacula
manage the volumes. If you want to do it yourself, you can, but as the
manual states, I provide the means to do it, but it probably won't be easy.
--
Best regards,
Kern
(">
/\
V_V
_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users