Problem
I would like to create a backup copy of the tape distribution for my SCO OpenServer Release 5 product. How do I do this?
Solution
SCO OpenServer Release 5 tape distribution media is made up of a number of cpio(C) archives. There is a label at the beginning of the tape distribution that tells you how many archives there are on the tape.
You can extract this label using the command:
cd /tmp
cpio -idumI /dev/rct0This will extract the label and place it in:
/tmp/opt/Distribution/SCO/*/*/SSO_1_LABEL/000The two directories marked above as "*" have names that are dependent upon the media and release that you are examining.
The 000 file is an ascii text file that contains, among other things, a set of ARCH records that indicate the number of archives that are on the media. An example file (for SCO OpenServer 5.0.0) is provided here:
DBASEINFO:
type=DISTRIBUTION
version=1.0
VO:0:
mediaType=TAPE
format=SERIAL
paperLabel=Product Tape Volume 1mediaLabel=./opt/Distribution/SCO/ProdTape/1.0.0/SSO_1_LABEL/000
ARCH:0:0:
format=CPIO
ARCH:0:1:
format=CPIO
contents=ISL_BOOT
ARCH:0:2:
format=CPIO
contents=DATABASES
ARCH:0:3:
format=CPIO
contents=ISL_FILES
ARCH:0:4:
format=CPIO
contents=CONTROL
ARCH:0:5:
format=CPIO
contents=SCO:pro::In the example above there are seven records on the media in total; 1 header + 6 ARCH records (0-5).
As an example only, the following script can be used to copy the tape media to hard disk (/tmp/media):
#!/bin/sh
count=0
while [ $count -lt 7 ]
do
dd if=/dev/nrStp0 of=/tmp/media/file$count
count=`expr $count + 1`
doneTo copy the images from hard disk back out to a new tape:
#!/bin/sh
count=0
while [ $count -lt 7 ]
do
dd if=/tmp/media/file$count of=/dev/nrStp0
count=`expr $count + 1`
doneNOTE: The tape media for SCO OpenServer 5.0.2 contains 239 ARCH records,
so with the header there are a total of 240 records on the tape.The while loop in the scripts above would need to be adjusted for this:
while [ $count -lt 240 ]Also, the tape media for SCO OpenServer 5.0.2 is about 180MB; ensure that there is enough disk space to hold the tape media files during the copy process.