Hello,

On Friday 26 August 2005 11:20, Russell Howe wrote:
> Kern Sibbald wrote:
> > On Wednesday 24 August 2005 20:34, Ryan Novosielski wrote:
> >>What I want is for
> >>bacula to use the tape with the lowest ID that is writable. I definite
> >>writable as any volume that is in a state that will allow it to be
> >>written to (including a tape that contains data but whose retention time
> >>has passed). I have 11 daily tapes, and after my full backup, I want
> >>tape #1 to be used. However, Bacula often wants tape 10 or 11 as they
> >>did not get used during the last cycle at all. If I want the drive to
> >>take tape 1, I have to disable the higher numbered tapes.
> >>
> >>Is there a way to do what I want without scripting? It's not readily
> >>apparent.
>
> It sounds like you want to replace Bacula's tape selection algorithm
> (which is probably roughly "which of the usable tapes in the pool has
> the oldest 'last used' date?") with one that says "Which of the usable
> tapes in the pool has the lowest id?". I'm not quite sure what you mean
> by "id", but let's assume you mean 'label'.
>
> Also, since you talk about doing this for your daily tapes after a full
> backup, I assume your "daily tapes" form a pool used for incremental or
> differential backups.
>
> In a later email you talk about "recycling all recyclable volumes".
> Bacula does this already. What I think you meant was "recycle (or even
> purge?) all volumes in the incremental/differential pool after a full
> backup has taken place", effectively wiping out your
> incremental/differential pool once you've got a full backup onto tape.
>
> It might sound like a good idea (and certainly makes it easy to know
> which tape to put in next), but really you're best off letting bacula
> decide which tape to use next. The tape selection algorithm it has
> should ensure that at any one time, you can make best use of the data on
> your backup tapes. If you purge a tape several days before you reuse it,
> then you can't make use of the data for those few days - sounds a bit
> silly, really... (well you can, if you bscan it in, but let's assume
> bscan is for disaster recovery only).
>
> If you want to implement your tape selection strategy, then, well,
> Bacula is open source, go ahead and edit away :)
>
> It might even be an idea to allow tape selection strategy to be
> pluggable (perhaps using the python interface?), although I doubt
> Kern'll feel like implementing it. He may well accept a patch to do so,
> however...
>
> Basically, your idea for tape selection doesn't agree with the way
> bacula does things. You might be able to fudge it using a runafterjob on
> your full backups (to purge all incremental/differential tapes,
> shouldn't be hard to do - think sqlquery, update media set
> status=something where ..., and then run a prune volumes or something),
> but ultimately you are probably better off with using the retention
> schema bacula's trying to get you to use!

Russell: nice analysis of the problem.  :-)

I believe that attempting to force Bacula to use particular Volumes is not 
such a good idea because Bacula automatically assures that the data is 
preserved as long as possible. If you change the order of the Volumes, you 
will most likely destroy previous copies of your data that you might want.  
In any case, I'll try to provide hooks so users can do what they want even if 
it is not best practice in my opinion.

Rather than worrying about the order of volumes, one should take a lot of care 
to create and preserve bootstrap files.  With several good bootstrap files, 
one for the catalog backup, and one for the data backup, you should never 
need bscan.

Concerning a Python interface: yes, this is relatively easy to do. I just need 
to have a name for it, and know where to put the call, and implement some way 
it can feed information to Bacula (e.g. the VolumeName is writable from 
Python).   Probably a call like NeedVolume would work, and if it sets a 
VolumeName that corresponds to the job and is available, Bacula could use it.

There is already requests for a Recycle event and a Scratch Pool event.  I've 
noted this new request.  For the moment, I haven't decided if I will add 
these in 1.38.0 or not.  If not, I'm 99.9% sure they will go in 1.38.1.

I need to complete the documentation.  Document and test some more bacula-web, 
and implement the distribution format for the GUI and Rescue projects 
(probably a tar file).  After that I'll see if there is enough time to add 
"load", "unload" and the new Python events.

-- 
Best regards,

Kern

  (">
  /\
  V_V


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to