Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: How keep only one copy .dmp?

RE: How keep only one copy .dmp?

From: Reidy, Ron <Ron.Reidy_at_arraybiopharma.com>
Date: Tue, 17 Jul 2007 09:24:56 -0600
Message-ID: <7209E76DACFED9469D4F5169F9880C7A675B0B@mail01bldr.arraybp.com>


Where does this find command occur in the script? If it is before the actual export, it is working just as it should.

Ron Reidy
Lead DBA

-----Original Message-----

From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of J. Dex Sent: Tuesday, July 17, 2007 8:51 AM
To: oracle-l_at_freelists.org
Subject: How keep only one copy .dmp?

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

--

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

This electronic message transmission is a PRIVATE communication which contains information which may be confidential or privileged. The information is intended to be for the use of the individual or entity named above. If you are not the intended recipient, please be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. Please notify the sender of the delivery error by replying to this message, or notify us by telephone (877-633-2436, ext. 0), and then delete it from your system.
--

http://www.freelists.org/webpage/oracle-l Received on Tue Jul 17 2007 - 10:24:56 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US