Bacula-users

Re: [Bacula-users] recover partial readable tape

2009-03-04 11:28:50
Subject: Re: [Bacula-users] recover partial readable tape
From: Arno Lehmann <al AT its-lehmann DOT de>
To: bacula-users AT lists.sourceforge DOT net
Date: Wed, 04 Mar 2009 17:25:14 +0100
Hi,

04.03.2009 17:01, Thomas Mueller wrote:
> hi
> 
> i've found out, that the error on tape is between file 4 and 20. i can 
> successfull forward space to file 20 ("mt -f /dev/nst0 20"). 

Good start.

> reading from file 0 with "dd if=/dev/nst0 of=/dev/null bs=64512"  works 
> until file 4 and 235MB. 
> 
> Is there a way to "reassemble" the two parts of the file and reread them 
> with bacula? i've not found any option like "skip file 4 to 20" with the 
> bextract,bscan,bls tools

You should use a bootstrap file to that purpose. The easiest way would 
be to initiate a restore from the console, and when all is done, 
instead of starting the job, copy the created bootstrap file and 
cancel the restore. Then, in the bootstrap file, remove all records 
pointing to tape files 5 to 19.

Alternatively, it's not too big a task to manually write a minimal 
bootstrap file, omitting the files in question.

When restoring, I guess you can expect problems with the files that 
have data partly in the affected tape files, but that might still be 
better than getting back nothing at all.

> i've allready read the first part of the tape to a file and 
> tried to read it from there. No luck so far:
> 
> bls: match.c:249-0 add_fname_to_include prefix=0 gzip=0 fname=/
> bls: butil.c:282 Using device: "/srv/backup/vtl" for reading.
> 04-Mar 16:50 bls JobId 0: Ready to read from volume "ARCHIVE-0000" on device 
> "FileStorage" (/srv/backup/vtl).
> 04-Mar 16:50 bls JobId 0: Error: block.c:275 Volume data error at 0:64511! 
> Wanted ID: "BB02", got "". Buffer discarded.
> 0 files found.
> bls: acquire.c:436-0 dir_update_vol_info. label=64 Vol=ARCHIVE-0000
> 
> seems that not all data is in correct order. if i do a "strings ARCHIVE-0000":

I'd use bls with j, k, L, p and v options to get a better idea of what 
actually is in the resulting volume file.

> BB02
> Bacula 1.0 immortal
> ARCHIVE-0000
> Archive
> Backup
> LTO-4
> backuphost
> backuphost-sd
> Ver. 2.2.8 26 January 2008
> Build Mar 28 2008 17:04:06
> ...
> 
> so BB02 seems to be there.

But we don't know if it'S in the right place, i.e. where Bacula 
expects the header data...

> anybody allready did such a tape reassembling? 

Well... kind of.

Not with tape files unreadable, but with extra or missing EOF marks. 
It's not exactly fun, but better than losing data in most cases :-)

> or if any programmer is out there: is it a big task to implement a 
> "skip file(s)" option to the volume utilities?

I guess you'll get a response similar to "manually edit the bootstrap 
file; the feature doesn't seem to be critical to most users, so we 
won't invest much there as long as more pressing projects are pending".

Arno

> - Thomas
> 
> 
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> 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

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users