linux oracle数据库的备份:
FIELNAME=/home/oracle/dmp/`date +%Y%m%d`.dmp
echo $FIELNAME > /home/oracle/dmp/filename
/home/oracle/product/9.2/bin/exp ccbip/'und\=2008CN(Y|N)' full=y file=$FIELNAME
bzip2 $FIELNAME
创建的文件都是oracle用户 oinstall组的
windows下自动备份的脚本:
expData.bat的内容:
exp file=c:\oracle_bak\tne%date:~4,10%.dmp owner=tne
exp file=c:\oracle_bak\prt%date:~4,10%.dmp owner=prt
exp file=c:\oracle_bak\sec%date:~4,10%.dmp owner=sec
exp file=c:\oracle_bak\tea%date:~4,10%.dmp owner=tea
exp file=c:\oracle_bak\pic%date:~4,10%.dmp owner=pic
exp file=c:\oracle_bak\system%date:~4,10%.dmp owner=system
path=D:\WinRAR 3.20
rar a Data%date:~4,10%.rar *%date:~4,10%.dmp
del *%date:~4,10%.dmp
阅读(812) | 评论(0) | 转发(0) |