Oracle Database 11.2 Full Database Export Scripts
Create scripts with .sh extension through Vi editor.
In this scripts delete your backup older than 3 days.
you need to change all path as per your environment.
Like ORACLE_HOME path, ORACLE_SID.
change system password.
Here script name is exp_full_DB.sh..
[Oracle ] $ vi exp_full_DB.sh
#!/bin/bash
#Delete exports older than 3 days
find /u01/db_exports -name '*.dmp' -mtime +3 | xargs rm -f
find /u01/db_exports -name '*.log' -mtime +3 | xargs rm -f
export ORACLE_SID=test
export ORACLE_HOME=/u01/app/oracle/product/11.2.0.3/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH:.
fdate=`date +%Y%m%d`
expdp system/manager@TEST directory=TESTODS_EXP_DIR dumpfile=TESTODS_$fdate.dmp logfile=TESTODS_export_$fdate.log full=y
No comments:
Post a Comment