oracle數(shù)據(jù)庫(kù)增量備份腳本
0備份腳本;#!/bin/bash;# incremental level 0 backup script
source /home/oracle/.bash_profile
current_day=`date +%Y%m%d`;mkdir /home/oracle/RMANBACKUP/$current_day;rman target; / <<EOF;run;{;CONFIGURE CONTROLFILE AUTOBACKUP ON;;CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/home/oracle/RMANBACKUP/$current_day/PID-%F';;allocate channel dev1 type disk;;allocate channel dev2 type disk;;allocate channel dev3 type disk;;backup incremental level 0 tag='db0';format '/home/oracle/RMANBACKUP/$current_day/%n_%T_%U' database;;sql 'alter system archive log current';;backup archivelog all format '/home/oracle/RMANBACKUP/$current_day/arc_%n_%T_%U' delete all input;;release channel dev1;;release channel dev2;;release channel dev3;;};EOF
1級(jí)累積增量腳本;#!/bin/bash;# incremental level 1 backup script
source /home/oracle/.bash_profile
current_day=`date +%Y%m%d`;incr_day=incr$current_day;mkdir /home/oracle/RMANBACKUP/$incr_day;rman target; / <<EOF;run;{;CONFIGURE CONTROLFILE AUTOBACKUP ON;;CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/home/oracle/RMANBACKUP/$incr_day/PID-%F';;allocate channel dev1 type disk;;allocate channel dev2 type disk;;allocate channel dev3 type disk;;backup incremental level 1 cumulative tag='db1';format '/home/oracle/RMANBACKUP/$incr_day/%n_%T_%U' database;;sql 'alter system archive log current';;backup archivelog all format '/home/oracle/RMANBACKUP/$incr_day/arc_%n_%T_%U' delete all input;;release channel dev1;;release channel dev2;;release channel dev3;;};EOF
每天RMAN出來(lái)的backup set集合到一個(gè)文件夾下面;
相關(guān)文章:
1. 快速刪除ORACLE重復(fù)記錄2. 整理Oracle數(shù)據(jù)庫(kù)碎片3. DB2數(shù)據(jù)庫(kù)中如何實(shí)現(xiàn)Oracle的某些功能4. 系統(tǒng)從oracle版本轉(zhuǎn)化為sqlserver版本5. 學(xué)好Oracle的六條總結(jié)6. Oracle災(zāi)難防護(hù)的關(guān)鍵技術(shù)7. oracle觸發(fā)器介紹8. Oracle以網(wǎng)格技術(shù)解決成本難題9. 怎樣看oracle查詢(xún)語(yǔ)句執(zhí)行計(jì)劃?10. oracle Export and Import 簡(jiǎn)介
