婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁(yè) > 知識(shí)庫(kù) > linux自動(dòng)運(yùn)行rman增量備份腳本

linux自動(dòng)運(yùn)行rman增量備份腳本

熱門標(biāo)簽:七日殺a19.5全地圖標(biāo)注 電渠外呼系統(tǒng) N個(gè)你智能電銷機(jī)器人 車瑪仕極限運(yùn)動(dòng)場(chǎng)所地圖標(biāo)注 騰訊地圖標(biāo)注要費(fèi)用嗎 外呼電話系統(tǒng)用卡嗎 高德地圖標(biāo)注公司名字大全 地圖標(biāo)注怎么保存 廣東營(yíng)銷智能外呼系統(tǒng)商家

一、增量備份腳本
0級(jí)備份腳本:紅色部分為自定義的備份文件放置的目錄

復(fù)制代碼 代碼如下:

#script.:BackupFull.sh
#creater:xyh
#date:2014-03-08
#desc:backup full database datafile in archive with rman
#connect database
export ORACLE_BASE=/u01/app/oracle
export ORACLE_SID=orcl
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
export PATH=$ORACLE_HOME/bin:$PATH
rman target/ EOF_RMAN
run{
allocate channel c1 type disk;
backup incremental level 0 tag 'db0' format
'/home/oracle/RmanBackup/db0_%d_%T_%s' database include current controlfile;
sql 'alter system archive log current';
backup filesperset 5 format '/home/oracle/RmanBackup/cf0_%d_%T_%s' archivelog all delete input;
#filesperset 5表示備份集里面最多包含5個(gè)文件 
delete noprompt obsolete;
release channel c1;
}
# end

1級(jí)備份腳本

復(fù)制代碼 代碼如下:

#script.:Incrl.sh
#creater:xyh
#date:2014-03-08
#desc:backup full database datafile in archive with rman
#connect database
export ORACLE_BASE=/u01/app/oracle
export ORACLE_SID=orcl
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
export PATH=$ORACLE_HOME/bin:$PATH
rman target/ EOF_RMAN
run{
allocate channel c1 type disk;
backup incremental level 1 tag 'db1' format
'/home/oracle/RmanBackup/db1_%d_%T_%s' database include current controlfile;
sql 'alter system archive log current';
backup filesperset 5 format '/home/oracle/RmanBackup/cf1_%d_%T_%s' archivelog all delete input;
#filesperset 5表示備份集里面最多包含5個(gè)文件 
delete noprompt obsolete;
release channel c1;
}
#end


二、使用linux的crontab設(shè)置自動(dòng)執(zhí)行備份
復(fù)制代碼 代碼如下:

crontab -e

按Enter后,可以像vi編輯器一樣輸入下面內(nèi)容
復(fù)制代碼 代碼如下:

0 1 * * 0 /home/oracle/BackupFull.sh >>/home/oracle/BackupFull.log
0 1 * * 3 /home/oracle/BackupFull.sh >>/home/oracle/BackupFull.log
30 1 * * 1-2 /home/oracle/Incrl.sh >>/home/oracle/Incr.log
30 1 * * 4-6 /home/oracle/Incrl.sh >>/home/oracle/Incr.log

查看crontab內(nèi)容:crontab -l
注:上面意思是把全庫(kù)備份日志寫到/home/oracle/BackupFull.log文件中,而增量備份日志寫到/home/oracle/Incr.log中
周日和周三凌晨1:00執(zhí)行0級(jí)全庫(kù)備份,周一、二、四、五、六凌晨1:30執(zhí)行增量備份

您可能感興趣的文章:
  • linux find下如何統(tǒng)計(jì)一個(gè)目錄下的文件個(gè)數(shù)以及代碼總行數(shù)的命令
  • Linux命令學(xué)習(xí)總結(jié)之rmdir命令
  • Linux命令學(xué)習(xí)總結(jié)之rm命令
  • Linux命令替換rm命令防止誤刪除
  • linux中rmdir命令使用詳解
  • linux的一個(gè)find命令配合rm刪除某天前的文件方法

標(biāo)簽:蘇州 大興安嶺 遼寧 贛州 玉樹 來(lái)賓 長(zhǎng)沙 棗莊

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《linux自動(dòng)運(yùn)行rman增量備份腳本》,本文關(guān)鍵詞  linux,自動(dòng),運(yùn)行,rman,增量,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《linux自動(dòng)運(yùn)行rman增量備份腳本》相關(guān)的同類信息!
  • 本頁(yè)收集關(guān)于linux自動(dòng)運(yùn)行rman增量備份腳本的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    主站蜘蛛池模板: 花莲县| 青龙| 文安县| 禄丰县| 莱州市| 贡觉县| 富川| 诸城市| 林口县| 富民县| 丰宁| 甘洛县| 石屏县| 通江县| 逊克县| 乌兰县| 洪江市| 修水县| 定陶县| 伊吾县| 宜黄县| 南宁市| 奉化市| 板桥市| 探索| 安乡县| 开化县| 尉氏县| 桦甸市| 昌邑市| 利辛县| 昂仁县| 台东市| 汝州市| 太湖县| 通城县| 徐州市| 龙游县| 临漳县| 防城港市| 浪卡子县|