Re: Reading Symbolics tapes on UNIX
"r. 'bear' stricklin" <[email protected]> Thu, 23 Jan 2003 23:15:50 -0500 (EST)
| Newsgroups | gmane.lisp.org.slug |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 23 Jan 2003, r. 'bear' stricklin wrote:
> I wrote a bourne shell script to make an 'image' of a QIC tape, so that it
> could be regenerated in the event of a media failure. I will send it to
> you this evening, when I am at home.
This script works with Solaris, and can be easily modified to work on
Linux or other unix systems. It will create one file in the filesystem for
each tape file read off the tape, in the order they are read. It's not
particularly robust, but if there are no errors on the tape, it gets the
job done. Generalizing how to handle tapes with read errors was not a
project I felt up to tackling when I threw the script together.
If your tape is byte-backward with respect to the platform you are reading
(like IRIX tapes are with respect to Solaris tapes), touch a file in the
current directory called 'byte-swap'. Symbolics tapes are in the same byte
order as Solaris tapes, by the way.
To image a QIC in tape drive 3 on a Solaris box, run
tapeimage 3
FWIW I use this script on my SPARCstation 20 to bulk image up to 7 QIC
tapes at a time. The machine could likely handle more, but that's as many
drives as I have. I handle errors by hand, with multiple reads and a
similar but slightly modified process. I do this a lot, so if you run into
trouble, feel free to contact me.
#! /bin/sh
PATH=/bin:/usr/bin:/usr/sbin
BASE=/dev/rmt/ # change depending on your system's tape
# device path
if [ ! "$1" ] ; then
echo "Usage: `basename $0` tape-device"
exit 1
fi
if [ -f "./byte-swap" ] ; then
swap="conv=swab"
fi
mt -f $BASE$1 ret
i=1
while `dd if=$BASE${1}n of=temp $swap` ; do
mv temp file.`date -u '+%Y%m%d.%T`.$y
y=`echo $y "+1" | bc`
done
# end of script
Good luck.
ok
r.