rman 0.1.2 備份 script
1.資料庫全備份指令碼
run{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
backup full tag 'nb' format '/opt/app/orabak/nb_full_%u_%s_%p' database include current controlfile;
sql 'alter system archive log current';
backup tag 'nb' filesperset 3 format '/opt/app/orabak/nb_arch_%u_%s_%p' archivelog all delete input;
release channel c1;
release channel c2;
release channel c3;
}
delete archivelog until time 'sysdate- 7' backed up 2 times to disk;
或
run{
allocate channel db01 type disk ;
allocate channel db02 type disk ;
backup(database
include current controlfile
filesperset=2
format '/opt/app/orabak/nb_full_%u_%s_%p'
tag="nb");
backup(archivelog all
format '/opt/app/orabak/nb_arch_%u_%s_%p'
tag="nb");
release channel db01;
release channel db02;
}
delete archivelog until time 'sysdate- 7' backed up 2 times to disk;
或
run{
configure device type disk parallelism 2;
backup(database
include current controlfile
filesperset=2
format '/opt/app/orabak/nb_full_%u_%s_%p'
tag="nb");
backup(archivelog all
filesperset=10
format '/opt/app/orabak/nb_arch_%u_%s_%p'
tag="nb");
}
delete archivelog until time 'sysdate- 7' backed up 2 times to disk;
2.資料庫零級備份指令碼
run{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
backup incremental level 0 tag 'nb0' format '/opt/app/orabak/nb_full_%u_%s_%p' database skip readonly;
sql 'alter system archive log current';
backup tag 'nb0' filesperset 3 format '/opt/app/orabak/nb_arch_%u_%s_%p' archivelog all delete input;
release channel c1;
release channel c2;
release channel c3;
}
delete archivelog until time 'sysdate- 7' backed up 2 times to disk;
或
run{
allocate channel db01 type disk ;
allocate channel db02 type disk ;
backup incremental level = 0
(database
include current controlfile
filesperset=2
format '/opt/app/orabak/nb_full_%u_%s_%p'
tag="nb0");
backup(archivelog all
format '/opt/app/orabak/nb_arch_%u_%s_%p'
tag="nb0");
release channel db01;
release channel db02;
}
delete archivelog until time 'sysdate- 7' backed up 2 times to disk;
或
run{
configure device type disk parallelism 2;
backup incremental level = 0
(database
include current controlfile
filesperset=2
format '/opt/app/orabak/nb_full_%u_%s_%p'
tag="nb0");
backup(archivelog all
filesperset=10
format '/opt/app/orabak/nb_arch_%u_%s_%p'
tag="nb0");
}
delete archivelog until time 'sysdate- 7' backed up 2 times to disk;
3.資料庫一級備份指令碼
run{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
backup incremental level 1 tag 'nb1' format '/opt/app/orabak/nb_full_%u_%s_%p' database skip readonly;
sql 'alter system archive log current';
backup tag 'nb1' filesperset 3 format '/opt/app/orabak/nb_arch_%u_%s_%p' archivelog all delete input;
release channel c1;
release channel c2;
release channel c3;
}
delete archivelog until time 'sysdate- 7' backed up 2 times to disk;
或
run{
allocate channel db01 type disk ;
allocate channel db02 type disk ;
backup incremental level = 1
(database
include current controlfile
filesperset=2
format '/opt/app/orabak/nb_full_%u_%s_%p'
tag="nb1");
backup(archivelog all
format '/opt/app/orabak/nb_arch_%u_%s_%p'
tag="nb1");
release channel db01;
release channel db02;
}
delete archivelog until time 'sysdate- 7' backed up 2 times to disk;
或
run{
configure device type disk parallelism 2;
backup incremental level = 1
(database
include current controlfile
filesperset=2
format '/opt/app/orabak/nb_full_%u_%s_%p'
tag="nb1");
backup(archivelog all
filesperset=10
format '/opt/app/orabak/nb_arch_%u_%s_%p'
tag="nb1");
}
delete archivelog until time 'sysdate- 7' backed up 2 times to disk;
4.資料庫二級備份指令碼
run{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
backup incremental level 2 tag 'nb2' format '/opt/app/orabak/nb_full_%u_%s_%p' database skip readonly;
sql 'alter system archive log current';
backup tag 'nb2' filesperset 3 format '/opt/app/orabak/nb_arch_%u_%s_%p' archivelog all delete input;
release channel c1;
release channel c2;
release channel c3;
}
delete archivelog until time 'sysdate- 7' backed up 2 times to disk;
或
run{
allocate channel db01 type disk ;
allocate channel db02 type disk ;
backup incremental level = 2
(database
include current controlfile
filesperset=2
format '/opt/app/orabak/nb_full_%u_%s_%p'
tag="nb2");
backup(archivelog all
format '/opt/app/orabak/nb_arch_%u_%s_%p'
tag="nb2");
release channel db01;
release channel db02;
}
delete archivelog until time 'sysdate- 7' backed up 2 times to disk;
或
run{
configure device type disk parallelism 2;
backup incremental level = 2
(database
include current controlfile
filesperset=2
format '/opt/app/orabak/nb_full_%u_%s_%p'
tag="nb2");
backup(archivelog all
filesperset=10
format '/opt/app/orabak/nb_arch_%u_%s_%p'
tag="nb2");
}
delete archivelog until time 'sysdate- 7' backed up 2 times to disk;
或
run{
configure device type disk parallelism 2;
backup incremental level = 2 cumulative
(database
include current controlfile
filesperset=2
format '/opt/app/orabak/nb_full_%u_%s_%p'
tag="nb2");
backup(archivelog all
filesperset=10
format '/opt/app/orabak/nb_arch_%u_%s_%p'
tag="nb2");
}
delete archivelog until time 'sysdate- 7' backed up 2 times to disk;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/25850100/viewspace-703940/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Backup And Recovery User's Guide-備份RMAN備份-使用RMAN備份備份集GUIIDE
- RMAN說,我能備份(9)--RMAN增量備份與備份保留策略
- 【RMAN】RMAN備份至ASMASM
- RMAN說,我能備份(14)--實戰RMAN備份
- rman 備份策略
- RMAN備份原理
- Backup And Recovery User's Guide-備份RMAN備份-用RMAN備份映象拷貝備份GUIIDE
- RMAN說,我能備份(3)--RMAN全庫備份和表空間備份
- 【RMAN】RMAN的備份保留策略
- rman備份和增量備份指令碼指令碼
- RMAN備份恢復典型案例——RMAN備份&系統變慢
- RMAN說,我能備份(5)--RMAN備份歸檔檔案
- Backup And Recovery User's Guide-RMAN備份概念-RMAN備份的多個拷貝-備份的備份GUIIDE
- RMAN的備份原理
- rman 備份指令碼指令碼
- rman備份型別型別
- RMAN 備份詳解
- RMAN備份詳解
- rman備份學習
- oracle之rman備份Oracle
- rman備份筆記筆記
- RMAN的備份加密加密
- Oracle RMAN 增量備份Oracle
- oracle rman備份命令Oracle
- 常用RMAN 備份命令
- rman備份指令碼指令碼
- rman 備份 全庫
- 【轉】Oracle rman備份Oracle
- -- RMAN備份詳解
- RMAN 備份策略 scripts
- rman備份設定
- exp備份和rman備份的區別
- Oracle 11g RMAN備份-增量備份Oracle
- RMAN備份與恢復之加密備份加密
- rman備份恢復-rman入門
- RMAN說,我能備份(11)--RMAN中的備份集屬性
- Shell Script(bash)--用於自動備份的Shell Script(轉)
- 【RMAN】RMAN備份恢復3 RMAN增量備份指令碼與crontab計劃任務指令碼