Hi
I have the following script which runs an ONTAPE backup.
Having recently installed a New Tape Drive (/dev/rmt/1m)
can somebody advise how to redirect ontape to send the backup to the new Tape drive.
Just changing 0m to 1m in the following statement
mt -f /dev/rmt/0m rew 2> /tmp/tape.check
has no effect - when the ontape statement runs, it still searches for a tape in the default drive (0m)
Any assistance greatly appreciated
SCRIPT:-
export INFORMIXDIR=/usr/informix
export ONCONFIG=onconfig.live
export INFORMIXSERVER=ONLINELIVE
export SERVERNUM=0
export KAIOON=1
# Make sure that the tape check file is not there already
rm -f /tmp/tape.check 2> /dev/null
# Rewind whatever is in the tape drive and output any error message
mt -f /dev/rmt/0m rew 2> /tmp/tape.check
# If an error message has been recorded then abort backup
if [ -s /tmp/tape.check ]
then
rm -f /tmp/tape.check 2> /dev/null
cat /home/informix/files/notape.live | mail backup
else
rm -f /tmp/tape.check 2> /dev/null
echo '\n' | $INFORMIXDIR/bin/ontape -s -L 0 | head -n 100 | mail
backup
fi
## Now clear down the logical logs
echo "\ny\n"| $INFORMIXDIR/bin/ontape -a
## Now free any unallocated virtual memory segments
$INFORMIXDIR/bin/onmode -F
END OF SCRIPT
Thanks foryour help
Gary
I have the following script which runs an ONTAPE backup.
Having recently installed a New Tape Drive (/dev/rmt/1m)
can somebody advise how to redirect ontape to send the backup to the new Tape drive.
Just changing 0m to 1m in the following statement
mt -f /dev/rmt/0m rew 2> /tmp/tape.check
has no effect - when the ontape statement runs, it still searches for a tape in the default drive (0m)
Any assistance greatly appreciated
SCRIPT:-
export INFORMIXDIR=/usr/informix
export ONCONFIG=onconfig.live
export INFORMIXSERVER=ONLINELIVE
export SERVERNUM=0
export KAIOON=1
# Make sure that the tape check file is not there already
rm -f /tmp/tape.check 2> /dev/null
# Rewind whatever is in the tape drive and output any error message
mt -f /dev/rmt/0m rew 2> /tmp/tape.check
# If an error message has been recorded then abort backup
if [ -s /tmp/tape.check ]
then
rm -f /tmp/tape.check 2> /dev/null
cat /home/informix/files/notape.live | mail backup
else
rm -f /tmp/tape.check 2> /dev/null
echo '\n' | $INFORMIXDIR/bin/ontape -s -L 0 | head -n 100 | mail
backup
fi
## Now clear down the logical logs
echo "\ny\n"| $INFORMIXDIR/bin/ontape -a
## Now free any unallocated virtual memory segments
$INFORMIXDIR/bin/onmode -F
END OF SCRIPT
Thanks foryour help
Gary