Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Preventing Tape from Rewinding and Writing over Itself during Backup

Status
Not open for further replies.

laudieda

Technical User
Oct 16, 2003
10
US
I am running the following script for our dailybackup and and having a problem with the tape rewinding itself when it reaches the end and writing over itself. The command tctl -f /dev/rmt0 rewoffl has been placed in the script, but the tape is still rewinding instead of ejecting and asking for another tape. Any help?

# Set up Tape Unit as a variable.
#

TAPENR=/dev/rmt0

#
wall 'The system will be going to backup in 1 minute'
#
sleep 60

#
echo "Bringing down the oracle applications\n"
su applmgr /backup/appsdown
#
# wait 5 minutes for the concurrent managers to come down normally.
sleep 300

echo "Bringing down the oracle databases\n"
su oracle /backup/oradown

#
#Unmount the file systems to backup
#
unmount /home
unmount /u01
unmount /u02
unmount /u03
unmount /u04

#
#backup
echo "Backing up the system\n"
#
/usr/sbin/backup -f $TAPENR -'0' '-u' /home
/usr/sbin/backup -f $TAPENR -'0' '-u' /u01
/usr/sbin/backup -f $TAPENR -'0' '-u' /u02
/usr/sbin/backup -f $TAPENR -'0' '-u' /u03
/usr/sbin/backup -f $TAPENR -'0' '-u' /u04

# run backlist, file containing list of dir to archive

# rewind and eject the tape
tctl -f /dev/rmt0 rewoffl
#
mount -v'jfs' /dev/hd1 /home
mount -v'jfs' /dev/ora01 /u01
mount -v'jfs' /dev/ora02 /u02
mount -v'jfs' /dev/ora03 /u03
mount -v'jfs' /dev/ora04 /u04

#
echo "Bringing the oracle databases up\n"
su oracle /backup/oraup
#
# echo "Bringing up the oracle applications\n"
su applmgr /backup/appsup
#
echo "\nDone\n"
date
#
 
laudieda,
Here are a couple quick suggestions.

1st - Since it appears you are running AIX change /dev/rmt0 to /dev/rmt0.1. rmt0.1 is the no-rewind device so it will not rewind after each backup. This will avoid the over write.

2nd - If you just want the tape to eject but not rewind the command would be tctl -f /dev/rmt0 offline. In this case it appears all your backup are complete so rewoffl is likely what you want.

Hope that helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top