Oracle數(shù)據(jù)庫邏輯備份的SH文件

Oracle數(shù)據(jù)庫邏輯備份的SH文件

正在看的ORACLE教程是:Oracle數(shù)據(jù)庫邏輯備份的SH文件。

完全備份的SH文件:exp_comp.sh

rq=` date +”%m%d” `

su – oracle -c “exp system/manager full=y inctype=complete file=/oracle/export/db_comp$rq.dmp”

累計備份的SH文件:exp_cumu.sh

rq=` date +”%m%d” `

su – oracle -c “exp system/ manager full=y inctype=cumulative file=/oracle/export/db_cumu$rq.dmp”

增量備份的SH文件: exp_incr.sh

rq=` date +”%m%d” `

su – oracle -c “exp system/manager full=y inctype=incremental file=/oracle/export/db_incr$rq.dmp”

root用戶crontab文件

/var/spool/cron/crontabs/root增加以下內(nèi)容

0 2 1 * * /oracle/exp_comp.sh

30 2 * * 0-5 /oracle/exp_incr.sh

45 2 * * 6 /oracle/exp_cumu.sh

當然這個時間表可以根據(jù)不同的需求來改變的,這只是一個例子。

? 版權聲明
THE END
喜歡就支持一下吧
點贊8 分享