Bacula-users

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

2013-10-26 12:30:52
Subject: Re: [Bacula-users] No Full backup before ${date} found (SOLVED)
From: Kern Sibbald <kern AT sibbald DOT com>
To: Bill Arlofski <waa-bacula AT revpol DOT com>, Bacula Users <bacula-users AT lists.sourceforge DOT net>
Date: Sat, 26 Oct 2013 18:27:18 +0200
Hello,

In response to your question.  The Enabled flag in the
Volume (Media) record is for use in disabling from any
kind of use whatsoever.  This is the only way we can guarantee
that a really bad Volume can never be mounted, and the use
of it as we currently use it, is in my opinion correct.

 From what I understand, you are trying for force Bacula to
ignore all volumes but those that are explicitly in some magazine.
In that case, it seems to me that you might be better off defining
each magazine to be a different Pool.  Of course, if you are using
Pools for other things that could cause problems.

Another way of doing it would be to change the Volume status to
Disabled, or Busy, and then those volumes will not be used, except
for read purposes (I think).

There needs to be a way to disable a volume, and your suggestion
will remove it, so I think implementing would cause a lot of problems.

Best regards,
Kern


On 10/24/2013 11:44 PM, Bill Arlofski wrote:
> On 10/18/13 11:50, Bill Arlofski wrote:
>> I have an interesting issue that I am seeing on a few bacula servers which I
>> manage.
>>
>> When attempting to do a restore and choosing option 5:
>>
>> 5: Select the most recent backup for a client
>>
>> then the client is selected, then the fileset, I am presented with:
>>
>> "No Full backup before 2013-10-18 11:40:14 found."
>>
>> However, a "list jobs" shows a Full backup with subsequent incrementals and
>> differentials following the full for the client.
>>
>>
>> However, if I start a restore, and choose option 3:
>>
>> 3: Enter list of comma separated JobIds to select
>>
>> and enter the JobId of the last Full backup for the same client I am able to
>> successfully restore any files I choose.
>>
>> Because I can restore by specific JobId, I am pretty certain that there is
>> nothing wrong with my Job, Files, Client, and Volume retention periods.
>>
>> This happens for any/every client I choose.
>>
>> Can anyone offer any insight to this issue? I'd really like to get to the
>> bottom of this.
>>
>> Using verison 5.2.13
>>
>> Thanks!
>
>
> Ok... I found the cause of this, and a solution, so I thought I would share.
>
> When selecting restore, then option 5, "Select the most recent backup for a
> client" the second built-in query submitted to the mysql db is:
>
> --[snip]--
> INSERT INTO temp1 SELECT Job.JobId,JobTdate FROM
> Client,Job,JobMedia,Media,FileSet WHERE Client.ClientId=18 AND Job.ClientId=18
> AND Job.StartTime < '2013-10-24 17:12:48' AND Level='F' AND JobStatus IN
> ('T','W') AND Type='B' AND JobMedia.JobId=Job.JobId AND Media.Enabled=1 AND
> JobMedia.MediaId=Media.MediaId AND Job.FileSetId=FileSet.FileSetId AND
> FileSet.FileSet='BaculaFullFileSet' ORDER BY Job.JobTDate DESC LIMIT 1
> --[snip]--
>
>
> The SELECT portion of this query returns zero rows. The reason?
>
> "AND Media.Enabled=1"
>
> >From the following thread,
>
> http://sourceforge.net/mailarchive/forum.php?thread_name=517064AE.2090809%40revpol.com&forum_name=bacula-users
>
> I had written and shared that script to solve a problem, but the unintended
> outcome was that I caused this restore problem.
>
> I am using vchanger, and the script from the thread above DISABLES all volumes
> not immediately available to Bacula, and enables only the file volumes on the
> currently inserted vchanger magazine(s).
>
> If I log into the mysql db, and issue:
>
> UPDATE Media SET Enabled="1";
>
> Then the built-in restore options work as expected.  This is an acceptible
> work-around for me because restores are done very infrequently, and the script
> to enable/disable available/not-availabe media is useful, and used daily. So
> needing to issue one command to the db before a performing a restore is not to
> worst thing in the world. :)
>
>
>
> So, question for Kern and the devs:
>
> Is the "AND Media.Enabled=1"  required in the built-in restore queries?
>
> Could that be removed and instead, a separate check and warning be issued to
> the operator if the media required for the restore is listed as disabled?
>
> Thanks for any feedback!
>


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users