Re: How keep only one copy .dmp?

  • From: GovindanK <gkatteri@xxxxxxxxx>
  • To: cemail_219@xxxxxxxxxxx
  • Date: Tue, 17 Jul 2007 10:34:50 -0700

I have seen this type of problem with unix. You will observe that running find $DMPDIR -name "*" -mtime 0 -exec rm {} \; (without the +) will give different results and is what you actually want ; In my env, i have put both;


HTH
GovindanK

J. Dex wrote:
How can I set my script to only keep one copy of a dump file? On Linux, I have the following line in the script (which is run nightly by cron). Yet I always seem to end up with 2 days worth of dmp files which are using up too much space. I only want for there to be one copy that stays on the server.

find $DMPDIR -name "*" -mtime +0 -exec rm {} \;



Rest of script that follows that line:

DT=`date +%Y%m%d%H%M`

gzip < $EXPPIPE > $DMPDIR/${ORACLE_SID}_full.dmp.${DT}.gz &

$ORACLE_HOME/bin/exp system/$exppass full=y file=$EXPPIPE log=$DMPDIR/${ORACLE_SID}_full_1db_exp_${DT}.log consistent=y compress=y

#Check log for errors below
cd $DMPDIR
grep -c "EXP-" ${ORACLE_SID}_full_1db_exp_${DT}.log > /dev/null
if [ $? = 0 ]
then
echo "failed export" | mail -s "export of $ORACLE_SID FAILED CHECK LOG FOR DETAILS" `cat $MAIL/dba`

exit 1
fi
exit

_________________________________________________________________
Don't get caught with egg on your face. Play Chicktionary! http://club.live.com/chicktionary.aspx?icid=chick_hotmailtextlink2

--
//www.freelists.org/webpage/oracle-l






--
//www.freelists.org/webpage/oracle-l


Other related posts: