LoveUnix » ORACLE等数据库 » ORACLE采用exp逻辑备份的sh文件
让LU留住您的每

一天 让LU博客留住您的每一天
2006-10-23 15:03 Gavin_ygf
ORACLE采用exp逻辑备份的sh文件

完全备份的SH文件:exp_comp.sh
DATE=` date +%F `
su - oracle -c "exp system/manager full=y inctype=complete file=/oracle/export/db_comp$DATE.dmp"

累计备份的SH文件:exp_cumu.sh
DATE=` date +%F `  
su - oracle -c "exp system/ manager full=y inctype=cumulative file=/oracle/export/db_cumu$DATE.dmp"

增量备份的SH文件: exp_incr.sh
DATE=` date +%F `
su - oracle -c "exp system/manager full=y inctype=incremental file=/oracle/export/db_incr$DATE.dmp"

root用户crontab文件
/var/spool/cron/crontabs/root增加以下内容
0 2 1 * * /oracle/exp_comp.sh
30 2 * * 0-5 /oracle/exp_incr.sh
45 2 * * 6 /oracle/exp_cumu.sh

2006-10-26 23:01 wwwlh
exp增量备份没有太大的意义,除非使用RMAN,否则你会发现增量的文件比FULL的还要大

页: [1]


Powered by Discuz! Archiver 5.5.0  © 2001-2006 Comsenz Inc.