How to get past end of cpio archive on tape

Mike Stefanik/78125 mike at bria.AIX
Wed Jan 2 10:56:47 AEST 1991


>In <1990Dec12.050414.15575 at bjm.wimsey.bc.ca> news at bjm.wimsey.bc.ca (News Login) writes:
> 
>I have this backup which I accidentally wrote a cpio archive over.  However
>the cpio archive is only 20 megabytes and therefore 1/3 of the tape.  What I
>really want to do is get past the cpio archive and just retreive the rest of
>the tape into a file and I will fix the remaining tar file by hand.  My 
>question is (drum roll please)
>how do get past the EOF marker at the end of the cpio?  I've tried dd, cat, 
>evmt (a utility which comes with ESIX [which I'm now running] which is similar
>to sco xenix's 'tape' utility) which allows me to get to the next eof but 
>not past
>it.  I don't really care how much past the eof I go (.5 to even 1 meg if I have
>to).  I think what I mostly overwrote was the /bin /usr/bin stuff. 

First you have to skip over the first "part" of the tape that you cpio'd to;
use the no-rewind tape device (ours is rmt4) and do:

	$ dd if=/dev/rmt4 of=/dev/null bs=512k

Then use dd to pull in the last "part" of the tape which is your tar'd files:

	$ dd if=/dev/rmt4 of=/tmp/damaged bs=512k

You can then pick through /tmp/damaged which would contain what remains of
your tar'd files. 

-----------------------------------------------------------------------------
Michael Stefanik, Systems Engineer (JOAT), Briareus Corporation
UUCP: ...!uunet!bria!mike
"If it was hard to code, it should be harder to use!"



More information about the Comp.unix.sysv386 mailing list