Bacula-users

Re: [Bacula-users] question about how retention works

2013-12-20 13:17:27
Subject: Re: [Bacula-users] question about how retention works
From: Dan Langille <dan AT langille DOT org>
To: Greg Woods <greg AT gregandeva DOT net>
Date: Fri, 20 Dec 2013 13:14:55 -0500
On 2013-12-20 01:00 PM, Greg Woods wrote:
> Good, we're getting somewhere.
> 
> On Fri, 2013-12-20 at 11:45 -0500, Dan Langille wrote:
> 
>> Let's confirm this.  Let's look at this job:
> 
> {SQL stuff snipped}
> 
> That is what I was eventually going to get around to doing, so thanks
> for doing that for me. So it looks like, if the same file is written to
> Volumes in multiple jobs, then there are multiple File records for it.
> 
>> > Building directory tree for JobId(s)
>> > 56,3603,3609,3616,3622,3710,3716,3722,3832,3839 ...
>> > ++++++++++++++++++++++
>> >
>> > For one or more of the JobIds selected, no files were found,
>> > so file selection is not possible.
>> 
>> Ahh, look there: 'one or more'
>> 
>> Perhaps you are able to restore by regex because you're using the jobs
>> which are not passed the File retention period?
> 
> I'll have to check that, but I'm pretty sure I was able to restore the
> entire /etc/.* tree, and the Full backup is definitely more than 30 
> days
> old and got pruned. But I'll verify that.
> 
> But there is also the "bscan" command, the man page for which states:
> 
>        The  purpose  of bscan is to read (scan) a Bacula Volume and to
> recreate or update the database contents
>        with the information found on the Volume.  This is done in a
> non-destructive way. This permits restoring
>        database entries that have been lost by pruning, purging,
> deleting, or a database corruption problem.

I hope I never have to use bscan....

[snip]
> 
> So it would appear that, in fact, there is information on the Volumes
> that duplicates the File records in the database, which means I may 
> well
> have been restoring files for which there were no longer any File
> records in the database. I'll play some SQL games this weekend and see
> if I can find an explicit example for which there is no File record but
> I can still restore the file.

Read http://www.bacula.org/en/dev-manual/main/main/Restore_Command.html

'If a Job's file records have been pruned from the catalog, the restore 
command will be unable to find any files to restore. Bacula will ask if 
you want to restore all of them or if you want to use a regular 
expression to restore only a selection while reading media. See 
FileRegex optionFileRegex and below for more details on this.'

Which indicates to me, the regex is applied as the data is read from the 
Volume.

-- 
Dan Langille - http://langille.org/

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users