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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 生產環境備份shell指令碼薦指令碼
- oracle RMAN備份指令碼Oracle指令碼
- [Oracle] rman備份指令碼(2)Oracle指令碼
- oracle rman備份指令碼收集Oracle指令碼
- RAC環境下的RMAN 備份指令碼一例指令碼
- 分享Oracle Rman的備份指令碼Oracle指令碼
- oracle rman 定時備份指令碼Oracle指令碼
- [Oracle] rman備份的指令碼(1)Oracle指令碼
- ORACLE RMAN備份的指令碼配置Oracle指令碼
- rman 備份指令碼指令碼
- rman備份指令碼指令碼
- rman備份產生等待事件事件
- oracle11g Rman 備份指令碼Oracle指令碼
- rman備份和增量備份指令碼指令碼
- rman 全備份指令碼指令碼
- rman增量備份指令碼指令碼
- windows rman備份指令碼Windows指令碼
- RMAN常用備份指令碼指令碼
- Linux環境下的一個rman備份的例項指令碼Linux指令碼
- Oracle ADG環境下的RMAN備份策略Oracle
- oracle11gRAC環境使用RMAN備份方案Oracle
- windows+oracle環境的RMAN備份計劃WindowsOracle
- oracle資料庫使用rman備份指令碼Oracle資料庫指令碼
- AIX/Linux生產環境下crontab自動排程RMAN物理備份例子AILinux
- Windows環境PgSql自動備份指令碼WindowsSQL指令碼
- hacmp環境下的rman備份ACM
- [Rman]Oracle Rman增量備份Level012指令碼Oracle指令碼
- 使用rman備份的指令碼指令碼
- Windows下RMAN備份指令碼Windows指令碼
- RMAN全庫備份指令碼指令碼
- RMAN備份Shel指令碼示例指令碼
- Rman備份的shell指令碼指令碼
- Oracle 11g RMAN multiplexing 備份指令碼Oracle指令碼
- Linux環境下的一個rman備份的例項指令碼(轉載)Linux指令碼
- RMAN定時全備份指令碼指令碼
- 轉貼:RMAN備份指令碼(Unix)指令碼
- rman 自動備份指令碼-windows指令碼Windows
- rman備份的shell指令碼(例子)指令碼