[comp.unix.questions] *** Accidently overwrote V.IMP data tape. Please help ***

muhammad@chaos.utexas.edu (Muhammad Pervez) (05/09/91)

Hi everyone!

	We have accidently overwritten our *very* important data 
tapes!  Please help. 

We have a 4D/20 machine running IRIX 3.3.1 (SYSV3) with a  tape 
drive. We use high  density 150MB tapes ( 3M DC6150 ).

	The person who did the backup used the following commands. 
He was intending to append some new files to the existing data.

	mt rewind			/* rewind magnetic tape */
	mt -t /dev/nrtapens feom	/* to goto end of medium */
	tar cvf /dev/nrtapens	my_new_files    /* using Gnu tar */
	mt rewind

The problem is that 'mt -t /dev/nrtapens feom' command did NOT put
the tape to the end of medium and therefore the tar command started
copying the new files from the beginning of the tape!

We have encountered this very same problem a couple of times before.
At that time it was considered to be a bug in the software.  Then
it was considered to have been fixed in the system that we are
currently using. ( IRIX 3.3.1 )

	My first question is has any other person out there 
encountered the same problem.  If so what was the cause.  Is it
a software problem (perhaps in the tape driver) or is it more likely
a hardware problem (maybe the tape drive is not communicating with
the driver as it should have been).

	Secondly I am willing to go thru any kind of trouble in 
order to retrieve the data if possible.  Theoratically the part of
data that has not been overwritten should still be on the tape.
We just can't access it using Tar.  Now question is how can I
restore that data?.  I don't know what the best way of recovering 
the data is. Is there a utility out there that can allow
me to scan the tape and read all the data BYTE BY BYTE.  This might
be helpful and I might be able to restore the data that has not
been overwritten.

	Thirdly what is the best way to append new files to the
existing files on the tape.  What is a very safe way to go to the
end of medium. I know that we can go thru our save sets (or backup
blocks) one by one and when we get the error message that there 
are no more blocks left on the tape.  Is there a better way around
this problem.  Has anybody out there written a utility that can
do these kinds of (or better and) safer things to go to the end of
medium.

	I will really appreciate your help.  I really would like
to recover the lost data if possible.  Also I would like to set 
up a very safe way to do the backups of our experimental data that
other people in our lab can rely on so that this kind of thing
will never happen again. So please let me know the best startegy
to append the files.

	Waiting to hear about any help that I can get!

						Muhammad Pervez.
                  
                    <><><><><><><><><><><><><><><><>
                    <>  Muhammad Shahzad A Pervez <>
		    <>			          <>

torek@elf.ee.lbl.gov (Chris Torek) (05/09/91)

In article <48701@ut-emx.uucp> muhammad@chaos.utexas.edu
(Muhammad Pervez) writes:
>We have accidently overwritten our *very* important data tapes!
>[They were] high density 150MB tapes ( 3M DC6150 ).

[A DC6150 is a Quarter Inch Cartridge tape, which tells most of the
story.  You have a SCSI QIC tape drive.]

This question comes up astoundingly often.

There is no easy way to read the tape.  SCSI QIC tape devices always
refuse to let you advance past the point where they believe the tape
ends.  This is not under software control.  (There may be QIC tape
controllers with firmware that does not have this `feature'.  If so, no
one has ever mentioned it here.)

QIC devices usually use a full-width erase head, so that when you write
on track zero it wipes out all the rest of the data.  Thus, if you are
using a 4-track format and have written 1/4th of the tape, none of the
original bits are there anymore.

If not much of the tape has been erased, the remaining tracks still
retain their bits, but they are hard to read.  Probably the easiest
method to read any given bit is to use magnetic developer and a
microscope.  Another possibility is to splice out the overwritten
portion of the tape.  Whether your tape device will be able to handle
this is another question.

>	Thirdly what is the best way to append new files to the
>existing files on the tape.

The safest way to append to a tape is to use a second tape.  Never
write on a tape containing useful data until that data has been
duplicated elsewhere.  (Staging the data on disk will also suffice,
though if the tape is a backup for that disk, you have gone from two
copies to one by doing so.)
-- 
In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 415 486 5427)
Berkeley, CA		Domain:	torek@ee.lbl.gov