:content
If you have the problem to restore an archive (containing a tar-file) from an 1/4-inch cartridge tape, then this could maybe help you.
I am not responsible for any loss of data, if you follow these steps!
These steps worked for my system, but I don't know, if you can do the same with your system.
I installed Linux on my desktop PC (RedHat 7.2, kernel 2.4.7-10). There was an Adaptec SCSI Adapter 2940 Ultra/Ultra Wide, the QIC-150 streamer was a Tandberg 4100 (branded by IBM) using SCSI ID 2.
After I connected the streamer to the SCSI bus (computer must be shut down!), and I booted the system, I could access the tape (the new hardware was detected without any problem) by these commands (as root):
mt -f /dev/nst0 rewind
mt -f /dev/nst0 status
The "status" command returned this output:
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 512 bytes. Densitiy code 0x10 (QIC-150/250 (GCR 10000 bpi)).
Soft error count since last status=0
General status bits on (45010000):
BOT WR_PROT ONLINE IM_REP_EN
if the tape is not write-protectioned, then the last lines change to:
General status bits on (41010000):
BOT ONLINE IM_REP_EN
I had no chance in accessing the tape with: /dev/rst0 (BSD), /dev/nrst0 (BSD), /dev/rst0 (SUN OS), /dev/rmt0.4 (AIX), /dev/st0, and many other device names I found in the internet.
Generally the command for controlling the tape device is mt, but you find also often cmt, tctl or tape.
Assumption: the (tar) archive contains the directory /home/~username (you should know what it contains, otherwise put a "*" there).
In that case you can test the content by:
tar -tvf /dev/nst0 /home/~username
and restore (into the current directory) by:
tar -xvf /dev/nst0 /home/~username
or restore a specific file ("important_file") by:
tar -xvf /dev/nst0 /home/~username/important_file
In my case the restoration of the whole archive (from full tape) wrote about 159 MB data to disk, and I had to restore the lacking data from a second tape
You create an empty file on disk, and restore the tape content to that file.
touch /mnt/exchange/archive.tar
disk=/mnt/exchange/archive.tar
tape=/dev/nst0
dd bs=512 <$tape >$disk
Check content with:
tar -tvf archive.tar
Restore content with:
tar -xvf archive.tar /home/~username
If this was useful, then please drop a note in
my guestbook.
|