Created
December 10, 2012 10:02
-
-
Save dulichan/4249706 to your computer and use it in GitHub Desktop.
Oracle backup for current date and time
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Callable script from an application. The directory is predefined in the backup folder. | |
echo "Starting the export at "`date` | |
# su - oracle | |
#/home/oracle | |
#cd /DSSNEXP/ | |
cd /u01/app/oracle/product/11.2.0/xe/bin | |
ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe; export ORACLE_HOME | |
PATH=$ORACLE_HOME/bin:$PATH; export PATH | |
mkdir /home/backup | |
DATE=`date +%Y-%m-%d-%r` | |
echo $DATE | |
./exp userid=user/password@XE log=exp.log file=/home/backup/$DATE.dmp buffer=50000 | |
echo "Export ended at "`date` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment