echo off

问题描述:

echo off
path=%path%;D:\oracle\product\10.2.0\client_1\bin
Exp fm_sc/emoss74@EMOSSDB1_10.206.4.74 Owner=fm_sc,File=E:\Data_Backup\EMOSSDB%date:0,4%%date:5,2%%date:8,2%%time:0,2%%time:3,2%%time:6,2%.dmp Log=E:\Data_Backup\LOGS\EMOSSDB%date:0,4%%date:5,2%%date:8,2%.log
Exp fm_scflow/1@EMOSSDB1_10.206.4.74 Owner=fm_scFLOW,File=E:\Data_Backup\EMOSSFLOWDB%date:0,4%%date:5,2%%date:8,2%%time:0,2%%time:3,2%%time:6,2%.dmp Log=E:\Data_Backup\LOGS\EMOSSFLOWDB%date:0,4%%date:5,2%%date:8,2%.log
Exp pmsi/1@EMOSSDB1_10.206.4.74 Owner=pmsi,File=E:\Data_Backup\EMOSSPMSIDB%date:0,4%%date:5,2%%date:8,2%%time:0,2%%time:3,2%%time:6,2%.dmp Log=E:\Data_Backup\LOGS\EMOSSFLOWDB%date:0,4%%date:5,2%%date:8,2%.log
rem 指定压缩程序的安装路径,以便备份后进行压缩,以节省磁盘空间方便远程传输;
path=%path%;C:\Program Files (x86)\winrar
rem 备份数据
rem 压缩备份后的文件,压缩比在1:10左右
rar a E:\Data_Backup\EMOSSDB%date:0,4%%date:5,2%%date:8,2%.rar E:\Data_Backup\EMOSSDB%date:0,4%%date:5,2%%date:8,2%*.dmp
rar a E:\Data_Backup\EMOSSFLOWDB%date:0,4%%date:5,2%%date:8,2%.rar E:\Data_Backup\EMOSSFLOWDB%date:0,4%%date:5,2%%date:8,2%*.dmp
rar a E:\Data_Backup\EMOSSPMIS%date:0,4%%date:5,2%%date:8,2%.rar E:\Data_Backup\EMOSSPMSIDB%date:0,4%%date:5,2%%date:8,2%*.dmp
rem 将打包后的备份文件拷贝到远程灾备服务器上
rem copy e:\backup\ccsbi_%date:0,10%.rar \\远程备份机\e:\backup\
rem 删除未压缩的备份文件,减少磁盘空间的占用
rem del e:\backup\ccsbi_%date:0,10%.*
echo on

命令文件