Re: [Bacula-users] bscan, file retention, and pruning
2010-11-19 06:36:18
>>>>> On Fri, 19 Nov 2010 10:00:53 +1300, Craig Miskell said:
>
> Martin Simmons wrote:
> >>>>>> On Thu, 18 Nov 2010 11:02:49 +1300, Craig Miskell said:
> >> So I have just seen a case where an old tape with a job that had it's
> >> file
> >> records pruned by the File Retention was bscan'd to get the records back
> >> into
> >> the database.
> >>
> >> The operator then tried to run a restore, but had managed to leave the tape
> >> drive in an inconsistent state (unmounted, with the tape in it, so mtx had
> >> a
> >> hernia), and the Restore job failed. That's unfortunate, but it happens,
> >> and
> >> isn't the real problem. When the job failed and finished, the File
> >> Retention
> >> period kicked in, and the bscan'd records were purged.
> >>
> >> This is somewhat annoying, and means we have to bscan again (4 hours+).
> >> In the
> >> general case of a bscan and a single successful restore, it's pretty much
> >> ok.
> >> But in case of a failure of the restore, or if we find we have to do more
> >> than
> >> one restore (the user decides they need more files after the first batch),
> >> this
> >> is a real pain.
> >>
> >> The somewhat crude approach is to raise File Retention on the client to a
> >> big
> >> enough period to cover back to when the tape was written, while going
> >> through
> >> the bscan/restore process, and setting it back to normal afterwards.
> >>
> >> Is there a better way? I'm thinking of something like marking the job as
> >> not-pruneable after the bscan and while doing restores, but I'm open to any
> >> suggestions.
> >
> > I assume you have AutoPrune=Yes in the client definitions (it is the
> > default)?
> > If so, try changing it to AutoPrune=No.
> >
> > You can either do that temporarily (instead of raising the File Retention)
> > or
> > you can do it permanently and also add Prune Files = Yes and Prune Jobs =
> > Yes
> > in the backup job definitions. Since the Restore job definition will not
> > have
> > these directives, it won't trigger any pruning.
> >
> > The only problem with the latter approach is that pruning will still occur
> > if
> > a backup runs before you have finished the restore.
> Thanks for both suggestions; the first is a nice clean option, although
> someone
> else suggested making the bscan'd volume Read Only, which is even less
> intrusive
> (affects just that volume).
Does setting VolStatus to Read Only work? It will certainly prevent
recycling, but I'm a little sceptical that it will prevent file pruning
because that code doesn't look at the Media table AFAICS.
__Martin
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
|
|
|