Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Sep 1997 00:29:13 -0500 (CDT)
From:      Jim Bryant <jbryant@argus.tfs.net>
To:        grog@lemis.com (Greg Lehey)
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: a c at the place of x (tar error)
Message-ID:  <199709030529.AAA01636@argus.tfs.net>
In-Reply-To: <19970903133610.20557@lemis.com> from Greg Lehey at "Sep 3, 97 01:36:10 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
In reply:
> On Tue, Sep 02, 1997 at 10:47:20PM +0200, Gianmarco Giovannelli wrote:
> >
> > I have done an error with a tape with a tar backup on it.
> > I want to restore a lot of data but instead of the x (xzv) I used the c
> > (czv) as option ...
> 
> For the next time: set write protect.
> 
> > Now I am not able to restore anything from this tape even if I suddenly
> > break the wrong command... (so a lot of data are still on the tape..). May
> > I do something to recover at least some files ?
> 
> It's a problem.  Even though you stopped the command quickly, you have
> written a partial archive, followed by two tape marks.  The tape
> driver will not skip past these marks, which signify that nothing more
> is present on the tape.
> 
> On the other hand, it's obvious that there are exceptions to this
> rule.  I'm copying -hackers on this one; possibly somebody will
> consider it a good idea to have an exceptional way of skipping past
> the tape marks.

i think that if a formal survey were done, nobody has made this
mistake [heh, heh], but then you are one of the brave few who have
admitted to such braindeath [we all should be so brave].

try this:

tar -tvzf /dev/nr[sw]t[0-7]

that will skip past the "oops" archive.

next

use dd to get the remainder of the damaged archive.

next

hack up a quickie to extract from the next internal tar file marker to
EOF.  after all this is done, you will have restored as much as is
possible, the tar internal format is fairly simple, thus i leave this
as an exercise for the reader.

by the time you finish you will have gone through enough bs so that
you will never have to admit to this kind of braindeath again.

have fun!  lots of fun!  tons of fun!

=^]

jim [who never has braindeath moments, and if you believe that, i have
this great waterfront property about 50 miles west of Catalina to sell
you]
-- 
All opinions expressed are mine, if you    |  "I will not be pushed, stamped,
think otherwise, then go jump into turbid  |  briefed, debriefed, indexed, or
radioactive waters and yell WAHOO !!!      |  numbered!" - #1, "The Prisoner"
------------------------------------------------------------------------------
Internet: jbryant@tfs.net          AX.25 Packet: kc5vdj@wv0t.#neks.ks.usa.noam
voice: KC5VDJ - 6 Meters AM/FM/SSB, 2 Meters AM/FM/SSB, 70cm FM.  grid: EM28PW
------------------------------------------------------------------------------
HF/6M/2M: IC-706-MkII, 2M: HTX-212, 2M: HTX-202, 70cm: HTX-404, Packet: KPC-3+



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