Oracle生產環境RMAN備份指令碼
題記:這裡分享一下我們oracle的備份指令碼,這些指令碼均在生產庫執行,正確無誤!
環境:SUSE linux 10sp2 + oracle 11gr1
說明:小型庫一般都是每週做一次全備,大型庫每週也做一次全備外,週三做1級增量備份,然後每天晚上都做一次2級增量備份,歸檔日誌每天分不同時段定時備份!
小型庫全備:
run {
# Hot database level 0 whole backup
allocate channel t1 type disk;
backup
incremental level 0
skip inaccessible
format '/backup/osedb_osedb01/data/back_%s_%p_%T_%d'
#AS COMPRESSED backupset
database plus archivelog
format '/backup/osedb_osedb01/arch/arclogback_%s_%p_%t_%d'
delete input;
delete obsolete;
release CHANNEL t1 ;
}
大庫全備:
> cat backup_db_level0.cmd
run {
# Hot database level 0 whole backup
allocate channel t1 type disk maxpiecesize=50G;
allocate channel t2 type disk maxpiecesize=50G;
allocate channel t3 type disk maxpiecesize=50G;
backup as compressed backupset
incremental level 0 tag 'subsdb_level0'
skip inaccessible
format '/backup/subsdb_subsdb1/data/bak_%d_%T_%s_%p_db_level0'
#AS COMPRESSED backupset
database
plus archivelog
format '/backup/subsdb_subsdb1/arch/arclogback_%s_%p_%t_%d'
delete input;
backup current controlfile format '/backup/subsdb_subsdb1/data/bak_%d_%T_%s_ctl.ctl';
release channel t1;
release channel t2;
release channel t3;
delete noprompt obsolete;
}
1級增量備份:
> cat backup_db_level1.cmd
run {
# Hot database level 1 whole backup
allocate channel t1 type disk maxpiecesize=50G;
allocate channel t2 type disk maxpiecesize=50G;
allocate channel t3 type disk maxpiecesize=50G;
backup as compressed backupset
incremental level 1 tag 'subsdb_level1'
skip inaccessible
format '/backup/subsdb_subsdb1/data/bak_%d_%T_%s_%p_db_level1'
#AS COMPRESSED backupset
database plus archivelog
format '/backup/subsdb_subsdb1/arch/arclogback_%s_%p_%t_%d'
delete input;
backup current controlfile format '/backup/subsdb_subsdb1/data/bak_%d_%T_%s_ctl.ctl';
release channel t1;
release channel t2;
release channel t3;
delete noprompt obsolete;
}
2級增量備份:
> cat backup_db_level2.cmd
run {
# Hot database level 2 whole backup
allocate channel t1 type disk maxpiecesize=50G;
allocate channel t2 type disk maxpiecesize=50G;
allocate channel t3 type disk maxpiecesize=50G;
backup as compressed backupset
incremental level 2 tag 'subsdb_level2'
skip inaccessible
format '/backup/subsdb_subsdb1/data/bak_%d_%T_%s_%p_db_level2'
#AS COMPRESSED backupset
database
plus archivelog
format '/backup/subsdb_subsdb1/arch/arclogback_%s_%p_%t_%d'
delete input;
backup current controlfile format '/backup/subsdb_subsdb1/data/bak_%d_%T_%s_ctl.ctl';
release channel t1;
release channel t2;
release channel t3;
delete noprompt obsolete;
}
歸檔日誌備份:
cat backup_arch.cmd
run {
allocate channel t1 type disk;
backup
skip inaccessible
format '/backup/osedb_osedb01/arch/arclogback_%s_%p_%t_%d'
#AS COMPRESSED backupset
(archivelog all delete input);
delete obsolete;
release CHANNEL t1 ;
}
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9399028/viewspace-1156945/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 分享Oracle Rman的備份指令碼Oracle指令碼
- Oracle ADG環境下的RMAN備份策略Oracle
- rman 備份指令碼指令碼
- oracle資料庫使用rman備份指令碼Oracle資料庫指令碼
- ORACLE備份指令碼Oracle指令碼
- Windows環境PgSql自動備份指令碼WindowsSQL指令碼
- ORACLE NBU調取oracle rman指令碼備份歸檔不自動刪除歸檔Oracle指令碼
- Oracle RMAN備份實戰Oracle
- Oracle OCP(60):RMAN 備份Oracle
- 【RMAN】在多租戶環境下的RMAN備份及恢復
- oracle自動冷備份指令碼Oracle指令碼
- ORACLE常用定時備份指令碼Oracle指令碼
- oracle 12c rman備份pdbOracle
- Oracle 備份恢復篇之RMAN catalogOracle
- 揭秘ORACLE備份之----RMAN之五(CATALOG)Oracle
- ORACLE DG從庫 Rman備份恢復Oracle
- Oracle RMAN備份以及壓縮原理分析Oracle
- oracle10g RMAN增量備份策略Oracle
- 備份指令碼指令碼
- 【RMAN】RMAN備份至ASMASM
- RMAN備份概述
- 【RMAN】RMAN的備份保留策略
- 【RMAN】Oracle12c以後rman 備份恢復命令參考Oracle
- mysql備份指令碼MySql指令碼
- RMAN之環境配置(二)---Backups to a Media Manager備份到介質管理器
- Oracle Rman Catalog的建立方法和備份原理Oracle
- RMAN備份恢復典型案例——RMAN備份&系統變慢
- ORACLE 12C RAC 生產環境搭建介紹Oracle
- Oracle Restart環境下的開機啟動指令碼OracleREST指令碼
- RMAN備份進度
- RMAN的備份原理
- 自動備份指令碼指令碼
- windows mysqldump備份指令碼WindowsMySql指令碼
- 【DATAPUMP】Oracle資料泵定時備份刪除指令碼Oracle指令碼
- webpack開發模式和生產模式設定及不同環境指令碼執行Web模式指令碼
- 生產環境 壓測
- ClickHouse生產環境部署
- Oracle9i RMAN 的優缺點及RMAN 備份及恢復步驟Oracle
- rman 增量備份恢復