程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> Oracle數據庫 >> Oracle數據庫基礎 >> 完全備份的SH文件

完全備份的SH文件

編輯:Oracle數據庫基礎
完全備份的SH文件:exp_comp.sh

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

  su - Oracle -c "exp system/manager full=y inctype=completefile=/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增加以下內容

  0 2 1 * * /Oracle/exp_comp.sh

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

  45 2 * * 6 /Oracle/exp_cumu.sh

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

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved