export script doesn't make gzip of dmp file [message #592424] |
Thu, 08 August 2013 02:26 |
ishika_20
Messages: 339 Registered: December 2006 Location: delhi
|
Senior Member |
|
|
Dear All,
Below are my script to take full backup of database. Only problem is, after generation of .dmp file, gzip doesn't make it compressed.
expdp system/oracle DIRECTORY=DP_DIR DUMPFILE=EXPDP_TAGITEST_`date +"%d%m%y_%H%M"`.dmp LOGFILE=EXPDP_TAGITEST_`date +"%d%m%y_%H%M"`.log FUL
L=Y
if [ `echo $?` -ne 0 ]; then
echo "The export failed at `date`" >> $EXPORT_LOG
else
echo
echo "The export succeeded at `date`" >> $EXPORT_LOG
find -name "*.log" -mtime +1 -exec rm {} \;
find -name "*.dmp.gz" -mtime +1 -exec rm {} \;
fi
gzip /usr/backup/dp_dir/EXPDP_TAGITEST_`date +"%d%m%y_%H%M"`.dmp
~
~
While checking the below script separatly, it compress the .dmp
gzip /usr/backup/dp_dir/EXPDP_TAGITEST_`date +"%d%m%y_%H%M"`.dmp
Kindly assist me to rectify the problem.
Regards,
Ishika
|
|
|
|
|
Re: export script doesn't make gzip of dmp file [message #592748 is a reply to message #592426] |
Mon, 12 August 2013 01:35 |
ishika_20
Messages: 339 Registered: December 2006 Location: delhi
|
Senior Member |
|
|
Dear All,
I used the below script to get export of database and it's worked.
#--------------------------------------------#
export PATH=/home/oracle/mono-1.9.1/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/oracle/bin:/opt/oracle/10.2.0/bin
export ORACLE_SID=testmydb
export ORACLE_HOME=/opt/oracle/10.2.0
export DMP_DEST=/bkup/dp_dir
export DMP_RETENTION=7
expdp system/oracle directory=DP_DIR dumpfile=expdp_`date +%d%m%y_%H_%M`_$ORACLE_SID.dmp LOGFILE=expdp_`date +%d%m%y_%H_%M`_$ORACLE_SID.log full=y exclude=statistics
###############gzip####################
gzip $DMP_DEST/*.dmp
##########################################deleted#######################################
echo "Cleaning up 1 week old backupfiles/logfiles ..."
find $DMP_DEST -name '*.gz' -mtime +$DMP_RETENTION -exec ls -l {} \;
find $DMP_DEST -name '*.gz' -mtime +$DMP_RETENTION -exec rm -r {} \;
echo "cleaning completed.."
Regards,
Ishika
|
|
|