Bscan will not help.  Eric is correct: you can't recover an overwritten tape
using normal tape drive software because it will not allow you to read beyond
the end of the last-written data.

__Martin


>>>>> On Mon, 25 Mar 2024 19:15:50 +0200, Pedro Oliveira said:
> 
> Please could try to use Bacula Volume utility tool  bscan
> 
> https://www.bacula.org/2.4.x-manuals/en/main/Volume_Utility_Tools.html
> 
> Create your WiseStamp email signature
> <https://www.wisestamp.com/lp/promo/professional-email-signature?utm_source=promotion&utm_medium=signature&utm_campaign=create_your_own&srcid=>
> 
> [image: __tpx__]
> ‌
> 
> 
> Dedy Yohann <y.d...@cinematheque.fr> escreveu em seg., 25/03/2024 às 19:12 :
> 
> > So I managed to relabel the tape, using the "btape labe" command. But as
> > you all implied, that's unfortunately not enough.
> >
> > When I run bextract, no files are restored and the command ends after a
> > couple of seconds
> > Here's the log (the volume ID is PAT031L7)
> >
> > # bextract -c /etc/bacula/bacula-sd.conf -t -V PAT031L7 Drive-0
> > /tmp/restore/ -v
> > bextract: butil.c:292-0 Using device: "Drive-0" for reading.
> > 25-Mar 18:01 bextract JobId 0: No slot defined in catalog (slot=0) for
> > Volume "PAT031L7" on "Drive-0" (/dev/nst0).
> >
> > 25-Mar 18:01 bextract JobId 0: Cartridge change or "update slots" may be
> > required.
> > 25-Mar 18:01 bextract JobId 0: Ready to read from volume "PAT031L7" on
> > Tape device "Drive-0" (/dev/nst0).
> >
> > 25-Mar 18:01 bextract JobId 0: End of Volume "PAT031L7" at addr=0:0 on
> > device "Drive-0" (/dev/nst0).
> > 0 files restored.
> >
> >
> > I am somewhat familiar with the disk recovery for block devices with dd.
> > I might give this a try after we figure if a recovery is absolutely needed.
> >
> > Thanks for the hints
> >
> >
> > Yohann DEDY
> > -------------------
> > Tél: 06 23 91 46 00
> > ------------------------------
> > *De :* Rob Gerber <r...@craeon.net>
> > *Envoyé :* lundi 25 mars 2024 16:35
> > *À :* Pedro Oliveira <oliveira...@gmail.com>
> > *Cc :* Dedy Yohann <y.d...@cinematheque.fr>; bacula-users <
> > bacula-users@lists.sourceforge.net>
> > *Objet :* Re: [Bacula-users] Mistakenly erased label headers from LTO
> > with btape test / need help to salvage content
> >
> > Standard data recovery processes are to take a bit for bit image of the
> > troubled media, them attempt all recovery against a copy of the image. This
> > process is used in disk recovery for block devices but I think it could
> > apply in your case also.
> >
> > At minimum, I would write some data to a scratch tape with bacula (at
> > least 20gb or something somewhat substantial consisting of known files
> > which you have hashed so you can verify the success of the recovery),
> > repeat the previous mistaken run of 'btape test' with reasonably quick
> > cancellation (but not too quick as to be overly optimistic!), then attempt
> > recovery.
> >
> > How recovery is done in this case is something I'm not super familiar
> > with. As suggested by Pedro, maybe label + bextract (spelling uncertain,
> > check bacula bin folder)? When dealing with a tape whose data is not in the
> > bacula catalog we typically want to run bscan, but I don't know if it will
> > handle this case well.
> >
> > The wisest case may be to set this tape aside and do a new full backup. If
> > a recovery is needed then you can attempt recovery of data from this tape.
> > If no recovery is ever needed, then no problem.
> >
> >
> >
> > Robert Gerber
> > 402-237-8692
> > r...@craeon.net
> >
> > On Mon, Mar 25, 2024, 10:25 AM Pedro Oliveira <oliveira...@gmail.com>
> > wrote:
> >
> > try to label again the tape and then try to use bexcrtac
> >
> > Create your WiseStamp email signature
> > <https://www.wisestamp.com/lp/promo/professional-email-signature?utm_source=promotion&utm_medium=signature&utm_campaign=create_your_own&srcid=>
> >
> > [image: __tpx__]
> > ‌
> >
> >
> > Dedy Yohann <y.d...@cinematheque.fr> escreveu em seg., 25/03/2024 às
> > 17:15 :
> >
> > Dear bacula community,
> > I made a mistake today while making maintenance tasks.
> >
> > I unintentionaly ran the "btape test" command on a LTO cartidge that was
> > already labeled and assigned to our main backup pool.
> >
> > When I realized data was written on the tape after a couple of seconds, I
> > stopped the operation (ctrl-c) in panic...
> > Unfortunately the evil was already done, now when I try to restore data
> > from this volume, the cartidge is correctly loaded in the drive (barcode
> > checked by the autochanger) but I get this error once data is read from the
> > tape :
> >
> > bacula-sd JobId 425: Warning: acquire.c:279 Read acquire: Could not
> > unserialize Volume label: ERR=label.c:987 Expecting Volume Label, got FI=0
> > Stream=0 len=64412
> >
> > Is there a way to manually restore the content of the tape or force the
> > relabelling of the tape without erasing the content of the cartidge?
> >
> > Thanks in advance for your suggestions,
> >
> > Yohann
> >
> > Bacula version : 9.6.7
> > Debian 10 (Buster)
> > Kernel 4.19.0-25-amd64
> >
> >
> > _______________________________________________
> > Bacula-users mailing list
> > Bacula-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/bacula-users
> >
> > _______________________________________________
> > Bacula-users mailing list
> > Bacula-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/bacula-users
> >
> >
> 


_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to