#!/bin/sh
DATE=`/bin/date +%Y-%m-%d-%H-%M`
BACK_PATH=/opt/backup/oracle_bak
ORACLE_BASE=/app2/oracle
ORACLE_HOME=/app2/oracle/product/10.2.0
ORACLE_SID=orcl
export ORACLE_BASE ORACLE_HOME ORACLE_SID BACK_PATH
EXP=/app2/oracle/product/10.2.0/bin/exp
$EXP user01/user01 file=$BACK_PATH/bwdasic-${DATE}.dmp log=$BACK_PATH/bwdasic-${DATE}.log
exit 0
加入cron,每天凌晨5点备份,oracle身份执行crontab -e
0 5 * * * /opt/backup/oracle_bak/oracle_bak.sh
阅读(1297) | 评论(0) | 转发(0) |