Created
November 21, 2011 14:14
-
-
Save metalrufflez/1382723 to your computer and use it in GitHub Desktop.
Dump an Oracle 10g (set it to run houly on cron)
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
#!/bin/bash | |
export ORACLE_HOME="/path/to/oracle/home" | |
export ORACLE_SID=SID | |
DB_BKPDIR="/path/to/backup/directory" | |
#EXPORT DA BASE DE DADOS | |
echo "Dumping Database" | |
${ORACLE_HOME}/bin/exp \"/ as sysdba\" file=$DB_BKPDIR/bkp_hourly.dmp log=$DB_BKPDIR/bkp_hourly.log buffer=3000000 compress=y full=y | |
echo "Compressing Dump" | |
bzip2 -f $DB_BKPDIR/bkp_hourly.dmp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment