oracle數(shù)據(jù)庫增量備份腳本
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出來的backup set集合到一個(gè)文件夾下面;
相關(guān)文章:
1. Oracle數(shù)據(jù)庫優(yōu)化及其應(yīng)用程序研究2. Oracle和MySQL的一些簡單命令對比3. Oracle 10g DBMS_SCHEDULER的中度解析4. Oracle取整函數(shù)用法案例5. oracle觸發(fā)器介紹6. 用腳本和查詢主動(dòng)監(jiān)視Oracle 9i性能7. Oracle 數(shù)據(jù)庫集中復(fù)制方法逐步精細(xì)8. SQL Server和Oracle數(shù)據(jù)鎖定比較9. Oracle數(shù)據(jù)庫物理文件大小的限制簡介10. 數(shù)據(jù)庫Oracle9i的企業(yè)管理器簡介
