I have a B180L controller running HP-UX 10.2 with an internal DDS2 tape drive and an external Surestore DDS (24gb) tape drive. I want to make duplicate copies of ignite tapes from one tape drive to another. What is the best way to do this?
I used to do those things, not for ignite but backup tapes (reels) on a 9000/855...(HP-UX 8...)
I remembered using dd, so Id go for dd:
dd if=<dev DDS-1> of=<dev DDS-2> bs=10k-64k ?
Wait I found (perhaps...) better:
#!/usr/bin/ksh
###################### DISCLAIMER #################################
# This software is provided as is with no guarantee or warranty
# expressed or implied as to its appropriateness or effectiveness.
#
# Tested configuration:
# Machine 9000/777
# HP-UX 10.20
# Ignite v1.38
# Tape drive C1533A
# Tape 60M
#
# Bootable tape created with:
# make_recovery -d /dev/rmt/c1t0d0DDS1n
#
# Tape duplication steps:
# put recovery tape in drive
# dup_tape -u /dev/rmt/c1t0d0DDS1n -d /extra
# put blank tape in drive
# dup_tape -p /dev/rmt/c1t0d0DDS1n -d /extra
#
# This command takes the two sections off of a boot install tape
# and puts them in regular files. Then the command can be used to
# put them back to another tape.
#
# The boot area requires 32MB and the system archive depends on the
# amount of inclusion done for make_recovery (typical minimum is
# 300MB). So, to duplicate a tape you will need approximately 350MB
# of free disk space.
#
typeset -i upack=0 pack=0
typeset tdir tdev bootimage sysimage opt
usage (){
print "usage: $1 [u|p] no_rewind_tape_device [d] tmp_dir"
print "unpack example: $1 -u /dev/rmt/1mn -d /extra_space"
exit 1
}
# check for enough command line arguments
(( $# < 4 )) && usage ${0##*/}
while getopts :u:p:d: opt
do
case $opt in
d) # temp dir
tdir=$OPTARG
;;
u) #unpack
upack=1
tdev=${OPTARG}
;;
p) #repack
pack=1
tdev=${OPTARG}
;;
*)
usage ${0##*/}
;;
esac
done
if [[ $tdev = "" || $tdir = "" ]];then
usage ${0##*/}
fi
if [[ ! -c $tdev ]]; then
print "$tdev not found or not a character device."
exit 1
fi
if [[ ! -d $tdir ]]; then
print "$tdir not found or not a directory."
exit 1
fi
bootimage="${tdir}/image"
sysimage="${tdir}/image2"
if (( upack )) ;then
mt -t ${tdev} rew
print "Extracting the boot area."
dd if=${tdev} bs=2k of=${bootimage}
print "Boot file contents."
lifls -l ${bootimage}
print "Extracting the system archive."
dd if=${tdev} bs=10k of=${sysimage}
file ${bootimage} ${sysimage}
fi
if (( pack )) ;then
mt -t ${tdev} rew
print "Putting the boot area on tape."
dd if=${bootimage} of=${tdev} bs=2k
print "Putting the system archive on tape."
dd if=${sysimage} of=${tdev} bs=10k
mt -t ${tdev} offline
fi
exit 0
ITRC source:
http://www11.itrc.hp.com/service/cki/docDisplay.do?docLocale=en&docId=KNC032098003
All the best