Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Nov 2007 08:53:46 -0400
From:      Bill Vermillion <bv@wjv.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: skip bad block on QIC-150 tar
Message-ID:  <20071102125345.GA47723@wjv.com>
In-Reply-To: <20071102120018.C2FCF16A47E@hub.freebsd.org>
References:  <20071102120018.C2FCF16A47E@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
At Fri, Nov 02, 2007 at 12:00 , our malformed and occasionally 
flatulent friend freebsd-questions-request@freebsd.org spewed forth this fount of brain juice:

> Message: 2
> Date: Thu, 1 Nov 2007 22:35:43 -0800
> From: "Ted Mittelstaedt" <tedm@toybox.placo.com>
> Subject: RE: skip bad block in QIC-150 tar

> > -----Original Message-----
> > From: owner-freebsd-questions@freebsd.org
> > [mailto:owner-freebsd-questions@freebsd.org]On Behalf Of
> > freebsd@dreamchaser.org
> > Sent: Thursday, November 01, 2007 11:10 AM

> > I'm trying to recover some files from a 5 yr old tar on a
> > QIC-150 tape.

> > Unfortunately, there's a bad block on the tape; tar barfs and
> > quits when it gets to it: tar: Unrecognized archive format:
> > Inappropriate file type or format

> > I managed to get a complete directory listing using tar t on
> > my first attempt, before the tape became unreadable; it had to
> > work at it but apparently managed to eventually get the block
> > read.

> > I've cleaned the tape and retried multiple times, to no avail.

> > I've tried omitting the directory containing the bad block,
> > but that hasn't prevented it from terminating.

> > Anyone know a way to get around this?

> Untar from the non-rewinding device.  When it hits the bad spot
> and aborts, just rerun tar again - it will start up the tape and
> forward it looking for the end of file mark that signifies the
> end of the current file and the beginning of the next.  You may need to
> rerun it a couple times to get past the bad section.  You can also use
> the "mt fsf" command to bump it forward.
> 
> Ted

And another method that I've used in similar cicrumstances,
is to use 'dd' and then extract from the dd'ed files.

When the failure occurs, then use the 'skip' funciton of dd to 
get past the bad section and save the next hunk.    That might be
something to try if the above suggestion does not work.

Bill

-- 
Bill Vermillion - bv @ wjv . com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071102125345.GA47723>