Bacula-users

Re: [Bacula-users] No Full backup before ${date} found (SOLVED)

2013-10-28 18:51:15
Subject: Re: [Bacula-users] No Full backup before ${date} found (SOLVED)
From: Bill Arlofski <waa-bacula AT revpol DOT com>
To: Kern Sibbald <kern AT sibbald DOT com>, Bacula Users <bacula-users AT lists.sourceforge DOT net>
Date: Mon, 28 Oct 2013 18:48:03 -0400
On 10/28/13 15:45, Kern Sibbald wrote:
> Hello Bill,
> 
> Unfortunately, after a bit more thought about your problem, I am not sure
> that changing the VolStatus is really going to be much help, because the
> VolStatus has a number of different states, and when you want to reuse the
> Volume you will probably want to put it back in the prior state -- that
> is a bit difficult when you are dealing with a value that is not just 
> flipping a bit.

Hi Kern... After responding to your email this morning just before running out
of the office, I spent about 2 minutes looking at this and that was all it
took for me to come to that very same conclusion.

It went like this:  If I set the VolStatus of a volume whose current VolStatus
is "append" or "Full"  to "Disabled"  ...

And that is as far as my thought got when I realized the problem. :)


> Probably what you are really asking for is a new Directive that is perhaps
> called UseInChangerOnly, which would only look at Volume that are in
> the Autochanger (in the magazine in your case).  Unfortunately, not only
> is that new code, but for disk based files, the InChanger flag is not
> updated, so it isn't just a trivial change.

Unless I am missing something, it looks like the InChanger flag is correctly
being set for my disk based volumes.   For the 68 volumes on the
currently-inserted vchanger magazine, they are the only ones with the
InChanger flag set to '1' all others are '0'.

If I put in a new volume, run my script (which does not touch the InChanger
field, only the Enabled) and then run an update slots, only the volumes on the
new magazine have InChanger set to '1'


Also, if the new code you are talking about were to be implemented in Bacula,
it sounds like my script would no longer be required because a simple bconsole
command in an Admin type job or RunBefore script:

Update slots Storage=c0 Drive=0

would then set the InChanger field correctly - and the new "UseInChangerOnly"
directive would take it from there.


> It is however something that I sometimes want when I go on vacation,
> I would like my (real) autochanger to only use Volumes in the changer,
> and to even purge the oldest one if it needs to.  I will think about it,
> especially now that I am leaving Saturday for a 1 month "vacation".
> Such a mode also makes sense in very large autochangers where
> all the volumes are in the changer.

I love it when I can come up with a problem that even the developer would like
to see "scratched" :)

> In the mean time, if you find a solution, please let me know what you
> came up with.

I'll think about it and let you know if something else comes to me, but
barring any new code being written, two simple bconsole commands:

sqlquery
UPDATE Media SET Enabled='1';

is a pretty easy temporary workaround. Especially considering that my script
to enable volumes on currently inserted magazines, and disable the rest is run
as an Admin type job just before nightly backups. So running that sqlquery
will never really cause any harm and there is nothing else to remember to do
after a restore job is finsished. (except to put the correct magazine back in
before the nightly backups :)

I do appreciate the additional time, thought and consideration you have given
to this issue.

-- 
Bill Arlofski
Reverse Polarity, LLC
http://www.revpol.com/
-- Not responsible for anything below this line --

------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users