Bacula-users

Re: [Bacula-users] Restore difficulty

2009-01-18 19:05:37
Subject: Re: [Bacula-users] Restore difficulty
From: "James Harper" <james.harper AT bendigoit.com DOT au>
To: "Tracy Reed" <treed AT ultraviolet DOT org>, <bacula-users AT lists.sourceforge DOT net>
Date: Mon, 19 Jan 2009 11:03:16 +1100
> I accidentally trashed an important directory and need to restore
> it. I am using external USB HD's for a disk to disk backup.
> 
> home-dir Version: 1.38.10 (08 June 2006)
> 
> Fedora release 8 (Werewolf)
> 
> Yes, the version of bacula is rather old but it has always worked for
> me so if it ain't broke don't fix it, right?
> 
> I have an old volume on a disk. It had been autopurged from the db
> because I had the purge time set too low for my current backup
> schedule.  So I bscan'd it back in. It showed up in the list of jobs
> and said my files were in it. I tried to restore but messed it up
> because I had the wrong USB drive mounted at the time so it could not
> find the volume it wanted and the restore error'd out. Then the job
> got auto-pruned again. I bscan'd it back in. It got pruned again. So I
> went in and told it not to auto-prune. I bscan again. I have bscan'd
> three times more and for some reason it now refuses to appear in the
> database. But I know it is the right volume and that my data is there
> because it did successfully show up in the db once.
> 
> Any suggestions on what I'm doing wrong? Any way I can just restore
> manually straight from the file like I can extract a file from a
> tarball? Running bscan is such a long slow process on 80G of data.
> 

Have you tried deleting the volume from the database completely before
bscan-ing it back in?

Also check the file retention and job retention values for the Client.

I can't remember exactly what I did last time I was in that situation
but it was something like that. Maybe:
1. delete volume
2. update the retention values on the Pool
3. bscan volume
4. check the file retention period for the newly added volume
5. hope that bacula didn't purge the data between steps 3 and 4.

I don't think bscan relies on the director actually running, so if
bacula is still purging data after bscan you should be able to stop the
director, do the bscan, then go into the database and set the retention
values there before starting the director again.
 
If you get really stuck and desperately need the files, you should be
able to use bextract to get them back, even if you have to restore the
whole thing (if you have space). I'm not sure that the permissions get
restored under bextract though.

For next time... doing a test restore once in a while is always a good
idea, so when you do need to restore files you'll know exactly what to
do.

Newer versions of Bacula appear to defer the purge of catalog records
until the latest possible time, which should prevent a reoccurrence of
the situation you are in now.

James


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>