Yes, according the boot log, it reboots on Sunday which I didn't know before.
The two times of down, on Dec 3 and Dec 9,it was just frozen.
The cron on Sunday and Monday morning( 4:30 am) is like this:
mkdir /rawdata/oraclebackup/`date '+%d-%B-%Y'`
cp /rawdata/data_* /rawdata/oraclebackup/`date '+%d-%B-%Y'`
cp /rawdata/c-* /rawdata/oraclebackup/`date '+%d-%B-%Y'`
cp /rawdata/arch* /rawdate/oraclebackup/`date '+%d-%B-%Y'`
rm -f /rawdata/data_*
rm -f /rawdata/c-*
rm -f /rawdata/arch*
I just rearrange some files.
The script run on Saturday is like this:
#move database backups to /raw/oraclebackup
mkdir /rawdata/oraclebackup/`date '+%d-%B-%Y'`
cp /rawdata/data_* /rawdata/oraclebackup/`date '+%d-%B-%Y'`
cp /rawdata/c-* /rawdata/oraclebackup/`date '+%d-%B-%Y'`
cp /rawdata/arch* /rawdata/oraclebackup/`date '+%d-%B-%Y'`
rm -f /rawdata/data_*
rm -f /rawdata/c-*
rm -f /rawdata/arch*
#end of moving
DIRECTORIES="/"
#DIRECTORIES="/etc /home /opt /root /var"
BACKUPTO=/dev/nst0
TAR=/bin/tar
PATH=/usr/local/bin:/usr/bin:/bin
START=`date +%s`
#Daily full backup
NEWER=""
echo "*****start time*****"
date
echo
if mt -f /$BACKUPTO status | grep "ONLINE"; then
echo "***** finding sockets*****"
find $DIRECTORIES -type s > sockets
echo
#echo "*****setting compression on*****"
#mt -f /$BACKUP compression 1
echo
#echo "*****setting type to DLT 35 Compressed*****"
#mt -f /$BACKUPTO setdensity 0x85
echo
echo "*****archiving*****
"
$TAR $NEWER -cf $BACKUPTO $DIRECTORIES --exclude-from=sockets --absolut
e-names --totals
echo
echo "*****tape-drive status*****"
mt -f /$BACKUPTO status
echo
echo "*****ejection tape*****"
mt -f /$BACKUPTO offline
echo
echo "*****end time*****"
date
else
echo "*****WARNING TAPE DRIVE IS OFFLINE, NO BACKUPS PERFORMED*****"
fi
FINISH=`date +%s`
diff=$((FINISH - START))
echo -n "***** Total Run Time: "
HRS=`expr $diff / 3600`
MIN=`expr $diff % 3600 / 60`
SEC=`expr $diff % 3600 % 60`
if [ $HRS -gt 0 ]
then
echo -n "$HRS hrs. "
fi
if [ $MIN -gt 0 ]
then
echo -n "$MIN mins. "
fi
if [ $SEC -gt 0 ]
then
if [ $MIN -gt 0 ]
then
echo "and $SEC secs. "
elif [ $HRS -gt 0 ]
then
echo "and $SEC secs. "
else
echo "$SEC secs. "
fi
fi
If there is no tape in the tape drive, it will give out an error but won't reboot. During the Thanksgiving, because no one helped to change the rejected tape, it would give out errors for several days. Is that the possible reason?
Thank you all!