April 21, 2015

Reading & Re-Creating QIC Tapes (for the MightyFrame)

(Note that this is on modern Linux using a Tandberg TDC-3620 with SCSI card, using DC600A tapes)

To read an original tape into the current working directory using my version of straight dd, create and run a script that looks like this:
(for logging purposes, I created 2 scripts, an "outer" and and "inner" script, named tapef and tapefslave respectively)

tapef:
#!/bin/sh
echo "What do you want to name this tape restoration file set? (SORRY, NO spaces allowed...)"
read input_variable2

sh tapefslave $input_variable2 2>&1 | tee $input_variable2-log.txt


tapefslave:
#!/bin/sh

echo "How many files do you think are on this tape?  Be generous with your guess."
read input_variable
echo "Answer: " $input_variable

input_variable=`expr $input_variable + 1`

a=1

while [ $a -lt $input_variable ]
do
      echo " "
   if [ $a -lt 10 ]
   then
      echo "sudo dd if=/dev/nst0 of=$1.F0$a"
            sudo dd if=/dev/nst0 of=$1.F0$a
   else
      echo "sudo dd if=/dev/nst0 of=$1.F$a"
            sudo dd if=/dev/nst0 of=$1.F$a
   fi

   if [ $a -eq $input_variable ]
   then
      break
   fi
   a=`expr $a + 1`
done

http://6reoquestions.com/misc/MightyFrame/ATT7300/Files/tapef

http://6reoquestions.com/misc/MightyFrame/ATT7300/Files/tapefslave

To re-create the tape contents onto a new blank tape:


Erase the source tape 
(be very careful that there is nothing you want to save here, OR something that the world of archived install programs, such as bitsavers.org, would appreciate)


sudo mt -f /dev/st0 erase


And then inside the directory that contains the tape source files, run a script that contains your version of this code:


#!/bin/sh
echo "What is the base filename this tape restoration file set? (without the '.FXX' extension)"
read input_variable2
echo "How many files are to be written to this tape?"
read input_variable

input_variable=`expr $input_variable + 1`

a=1

while [ $a -lt $input_variable ]
do
   if [ $a -lt 10 ]
   then
      echo "sudo dd if=$input_variable2.F0$a
of=/dev/nst0"
            sudo dd if=$input_variable2.F0$a
of=/dev/nst0 
    else
      echo "sudo dd if=$input_variable2.F$a
of=/dev/nst0"
            sudo dd if=$input_variable2.F$a
of=/dev/nst0
    fi

   if [ $a -eq $input_variable ]
   then
      break
   fi
   a=`expr $a + 1`
done