Bacula-users

Re: [Bacula-users] bscan catalog restore problem

2008-04-17 15:41:21
Subject: Re: [Bacula-users] bscan catalog restore problem
From: Arno Lehmann <al AT its-lehmann DOT de>
To: bacula-users AT lists.sourceforge DOT net
Date: Thu, 17 Apr 2008 21:40:39 +0200
Hi,

17.04.2008 16:28, lists wrote:
> 
> 
> On Thu, Apr 17, 2008 at 3:15 PM, John Drescher <drescherjm AT gmail DOT com 
> <mailto:drescherjm AT gmail DOT com>> wrote:
> 
>     On Thu, Apr 17, 2008 at 10:11 AM, lists <lists AT olofsson DOT tv
>     <mailto:lists AT olofsson DOT tv>> wrote:
>      > Hi,
>      >  I'm trying to use bscan to restore the catalog from tape.
>      > Bacula version is 1.38.11
>      >
>      >  This is the command I'm using
>      >
>      >  bscan -V brendan_crew_001 -v -s -m -c bacula-sd.conf /dev/nst0
>      >
>      >  17-Apr 12:43 bscan: End of file 317  on device "LTO3" (/dev/nst0),
>      >  Volume "brendan_crew_001"
>      >  17-Apr 12:43 bscan: End of file 318  on device "LTO3" (/dev/nst0),
>      >  Volume "brendan_crew_001"
>      >
>      >  This the start of the Errors:
>      >
>      >  bscan: bscan.c:929 Fileset "brendan_crew" already exists.
>      >  bscan: bscan.c:1044 Could not update JobId=6862 record.
>      >  ERR=sql_update.c:169 Update problem: affected_rows=0
>      >
>      >  bscan: bscan.c:1145 Created JobMedia record JobId 6862, MediaId 90
>      >  17-Apr 12:44 bscan: End of file 319  on device "LTO3" (/dev/nst0),
>      >  Volume "brendan_crew_001"
>      >  bscan: bscan.c:487 SOS_LABEL: Found Job record for JobId: 0
>      >  bscan: bscan.c:929 Fileset "brendan_crew" already exists.
>      >  bscan: bscan.c:1044 Could not update JobId=6874 record.
>      >  ERR=sql_update.c:169 Update problem: affected_rows=0
>      >
>      >  Anyone Have any idea as to what could be the problem ?
>      >  I don't want to have to restore the entire tape its 320GB so if
>     i could get
>      > this fixed
>      > Nils

I haven't used bscan for a long time, but I agree with John - I see no 
problems in your output.

>     I do not see any errors in that output. It just says that the stuff
>     you are restoring is already in the catalog.
> 
> 
> Yes, you would think so, but when I go to restore it i get
> 
> using option 5
> 
> No Full backup before 2008-04-17 15:18:23 found.
> 
> The way I understand it is that if the database gets purged or pruned 
> you could use bscan to repopulate the db enough to run a restore against 
> it.

It is possible that in the time between your bscan run and the restore 
the jobs in question got purged already. It's safer to set a longer 
retention time before bscanning... you would do that in the DIR 
configuration, then reload, update the volume from the resource, then 
possibly disable automatic pruning of the volume in question and only 
then start bscanning.

Of course there should be logged messages regarding pruning in the 
console log file.

>  I've followed the bscan docs and its should work but its isn't.

You could check what happens in the catalog while bscan is running. 
The simplest thing to do would be using bconsole's queries, or watch 
the catalog backend database working.

Arno

> Nils
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
> Don't miss this year's exciting event. There's still time to save $100. 
> Use priority code J8TL2D2. 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users

-- 
Arno Lehmann
IT-Service Lehmann
www.its-lehmann.de

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users