Bacula-users

Re: [Bacula-users] Tape recovery question

2008-09-08 19:55:14
Subject: Re: [Bacula-users] Tape recovery question
From: Arno Lehmann <al AT its-lehmann DOT de>
To: bacula-users AT lists.sourceforge DOT net
Date: Tue, 09 Sep 2008 01:54:55 +0200
Hello,

08.09.2008 20:41, Nikola Pavković wrote:
> Hi,
> 
> I accidentally made a "mt rewind && mt weof" on one of my tapes so that
> bacula does not recognize it as a bacula volume anymore, however the
> data on the tape should still be present.

Bad, but up to this point, there's a chance to recover most of the data.

> I tried several things but
> could not get past the eof mark on the tape. Last thing I tried is label
> the tape once again

That probably destroyed more of the data.

> (had to remove the volume entry from the catalog),
> and do a "bls -V VOLNAME /dev/nst0", but the tape does not move and the
> command waits forever.
> 
> Is there any chance to recover the data that is on the tape, which is
> located after the label mark?

Well, once you get the data off the tape, you can try to recover it 
with bextract and it's -p switch.

Getting beyond the existing end-of-tape mark is the difficult thing.

What you tape data now looks like is

Bacula volume header | EOF | EOF | incomplete block of Bacula data | 
complete blocks of Bacula data

The task is to get the tape drive to read beyond the two EOFs, which 
are translated to and end-of-tape mark.

You can try the following:
Load the tape into the drive
verify the current situation using bls and mt: There should be a 
bacula label and noting more, and after a 'mt -f /dev/nstX eom' you 
should be at file 1 on the tape.
If that's the case, try to write some data to tape and do not write an 
EOF mark, like 'dd if=/dev/zero bs=65536 count=4 of=/dev/nstX'. Be 
sure to use the non-rewinding tape devices (in this example, typical 
linux device names; yours might differ).

With some luck (and depending on what the tape drive, SCSI driver, and 
tape driver actually do...) you end up with something like
Bacula volume header | EOF | 00000... | incomplete block of Bacula 
data | complete blocks of Bacula data

Then try if you can get the tape drive to space further into the tape: 
'mt rewind && mt fsf 5' for example. If that works, you can try your 
luck with bextract.

You'll lose some of your data in any case, but the remaining 99.999% 
of an LTO-4 tape might be worth that :-)

Alternatively, use a data recovery service - they claim to be able to 
read data beyond EOD marks, though I've heard stories that they can 
not always.

Arno

> 
> Thank you.
> 
> Nikola Pavkovic
> 
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
> 

-- 
Arno Lehmann
IT-Service Lehmann
Sandstr. 6, 49080 Osnabrück
www.its-lehmann.de

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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>