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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TAR

Status
Not open for further replies.

harpal

Technical User
Oct 3, 2001
115
GB
I am running a tar command on some filesystems the problem is the backup fails everynight I have done a tar -tvf and redirected the output to a file it seems like all files are backed up apart from the ones listed below.

-rw-r--r-- 1 oracle8 oinstall 9060753408 09 Jan 13:38 nsbme_l00_gendata_a.dbf

-rw-r--r-- 1 oracle8 oinstall 9060753408 09 Jan 13:37 nsbme_l00_gendata_b.dbf

-rw-r--r-- 1 oracle8 oinstall 8658100224 09 Jan 13:38 nsbme_l00_genndx_a.dbf

-rw-r--r-- 1 oracle8 oinstall 8658100224 09 Jan 13:38 nsbme_l00_genndx_b.dbf

but every other file in the directory the above files reside get backed up I user tar -cvf ./r1 \ in our overnight script to backup the /r1 files system.

Question1

I am wondering as the above files are each well over 8 gigs in size whether the tape used dlt IV 40/80 might wwll be running out of space can this be the case.

Question2

as mentioned in question1 the tape used is a quantum dlt IV 40/80 I was wondering how I would go about using tape compression to help me backup these files is this possible.

thanks in advance
 
By default, the DLT drive uses compression. You can turn it off, but it is on by default.

Post the error message.

Bill.
 
SUCCESS: Oracle Database Instance Shutdown Successfully at 19:16
****************************************************************************************

***************************************************************************
DAILY BACKUP STARTED AT Tue 8 Jan 19:16:34 2002
Daily Backup Process Started on Tue 8 Jan 19:16:34 2002
***************************************************************************

ERROR: DAILY BACKUP ABORTED AT Tue 8 Jan 23:09:35 2002
ERROR: Possible Media Corruption or Media not in Drive
ERROR: Escalate to Technical Support
ERROR: Daily Backup Process Abnormally Terminated 23:09
***************************************************************************************

*******************************************************************************
ORACLE DATABASE STARTED AT Tue 8 Jan 23:09:35 2002
Oracle Database Instance Startup in Progress at 23:09
 
Bill

I have attached the daily backup part of our script.

# Files to be included are currenlty
# Any new ones should be listed here and then put in the tar command.
#
daily_bkup()
{
DIR="./oracle/oradata/live ./m1/oracle/oradata/live ./m2/oracle/oradata/live ./r1 "
echo "***************************************************************************" >> $logfile
echo "DAILY BACKUP STARTED AT `date`" >> $logfile
echo "Daily Backup Process Started on `date`" >> $logfile
echo "***************************************************************************" >> $logfile
echo "" >> $logfile

tar cf $NOREWIND1 $DIR

if [ $? -eq 0 ]
then
echo "***************************************************************************" >> $logfile
echo "SUCCESS: Daily Backup Completed Successfully at `date +%H:%M`" >> $logfile
echo "***************************************************************************" >> $logfile
echo "" >> $logfile
else
echo"****************************************************************************************" >> $logfile
echo "ERROR: DAILY BACKUP ABORTED AT `date`" >> $logfile
echo "ERROR: Possible Media Corruption or Media not in Drive" >> $logfile
echo "ERROR: Escalate to Technical Support" >> $logfile
echo "ERROR: Daily Backup Process Abnormally Terminated `date +%H:%M`" >> $logfile
echo "***************************************************************************************" >> $logfile
echo "" >> $logfile
fi
}
 
I see it now. If the "tar -cvf ./r1" syntax is correct as posted it is wrong.

It should be "tar -cvf [tape drive] ./r1

[tape drive] is "/dev/rmt0" or "/dev/rmt1" or some other tape device name.

Bill.
 
$NOREWIND is specified below at the start of the script

NOREWIND1=/dev/rmt1.1
 
Try This...

daily_bkup()
{
exec 1>>$logfile 2>>$logfile
DIR="./oracle/oradata/live ./m1/oracle/oradata/live ./m2/oracle/oradata/live ./r1 "
echo "DAILY BACKUP STATED AT `date`"
echo "Daily Backup Process Started on `date`"
echo "***************************************************************************"
echo ""

tar -cvf $NOREWIND1 $DIR
rc=$?

if [ $rc -eq 0 ]
then
echo "***************************************************************************"
echo "SUCCESS: Daily Backup Completed Successfully at `date +%H:%M`"
echo "***************************************************************************"
echo ""
else
echo"****************************************************************************************"
echo "ERROR: DAILY BACKUP ABORTED AT `date`"
echo "ERROR: Possible Media Corruption or Media not in Drive"
echo "ERROR: Escalate to Technical Support"
echo "ERROR: Daily Backup Process Abnormally Terminated `date +%H:%M`"
echo "Error code is: $rc"
echo "***************************************************************************************"
echo ""
fi
}

What this will do is grab all of the stdout and stderr during the backup and put it into the log. As well, you'll see the exact error code that "tar" returns to you.

Bill.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top