RMAN 備份策略 scripts
szjsdbsvr1:11g:jingsuan > more rman_jingsuan.rcv
crosscheck archivelog all;
delete noprompt expired archivelog all;
crosscheck backup;
delete noprompt obsolete;
delete expired copy;
run{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
allocate channel c4 type disk;
allocate channel c5 type disk;
allocate channel c6 type disk;
allocate channel c7 type disk;
allocate channel c8 type disk;
backup as compressed backupset database format '/bea/rman/jingsuan_full_%U'
plus archivelog skip inaccessible delete all input format '/bea/rman/jingsuan_ARC_%U';
backup current controlfile format '/bea/rman/jingsuan_control_bak_%T';
backup spfile format '/bea/rman/jingsuan_spfile_bak_%T';
release channel c1;
release channel c2;
release channel c3;
release channel c4;
release channel c5;
release channel c6;
release channel c7;
release channel c8;
}
crosscheck archivelog all;
delete noprompt expired archivelog all;
crosscheck backup;
delete noprompt obsolete;
delete expired copy;
run{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
allocate channel c4 type disk;
allocate channel c5 type disk;
allocate channel c6 type disk;
allocate channel c7 type disk;
allocate channel c8 type disk;
backup as compressed backupset database format '/bea/rman/jingsuan_full_%U'
plus archivelog skip inaccessible delete all input format '/bea/rman/jingsuan_ARC_%U';
backup current controlfile format '/bea/rman/jingsuan_control_bak_%T';
backup spfile format '/bea/rman/jingsuan_spfile_bak_%T';
release channel c1;
release channel c2;
release channel c3;
release channel c4;
release channel c5;
release channel c6;
release channel c7;
release channel c8;
}
szjsdbsvr1:11g:jingsuan > more backup_db.sh
PATH=$PATH:$HOME/bin
export PATH
export ORACLE_BASE=/bea/app/oracle
export ORACLE_SID=jingsuan
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:$PATH
export EDITOR=vi
export NLS_LANG='AMERICAN_AMERICA.ZHS16GBK'
mv /bea/rman/jingsuan_* /bea/rmanbak/
logName=jingsuan_rman_`date +'%Y%m%d%H%M%S'`_full.log
find /bea/rmanbak/ -name "jingsuan_*" -mtime +1 -exec rm -rf {} \;
cd /bea/rman
rman target / CMDFILE rman_jingsuan.rcv >> $logName
cd /bea/rman
rman target / CMDFILE rman_jingsuan.rcv >> $logName
szjsdbsvr1:11g:jingsuan > crontab -l
00 02 * * * sh /bea/rman/backup_db.sh
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22578826/viewspace-754139/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- rman 備份策略
- 【RMAN】RMAN的備份保留策略
- RMAN說,我能備份(9)--RMAN增量備份與備份保留策略
- 【rman備份策略】實驗
- rman備份集的保留策略
- Oracle備份及備份策略及基於Linux下 Oracle 備份策略(RMAN)OracleLinux
- RMAN說,我能備份(18)--制訂備份策略
- oracle rman備份及策略設定Oracle
- RAC模式下的備份策略以及RMAN備份指令碼模式指令碼
- oracle10g RMAN增量備份策略Oracle
- 三種Oracle RMAN備份加密策略(上)Oracle加密
- 三種Oracle RMAN備份加密策略(下)Oracle加密
- RMAN 常用操作命令二(備份保留策略)
- 一次rman備份 策略調整
- 探索ORACLE之RMAN_05備份策略Oracle
- RAC模式下的備份策略以及RMAN備份指令碼(轉)模式指令碼
- RAC模式下的備份策略以及RMAN備份指令碼(ZF)模式指令碼
- 基於Linux下 Oracle 備份策略(RMAN)LinuxOracle
- 一次 rman 備份策略的調整
- aix下rac環境rman備份策略部署AI
- Backup And Recovery User's Guide-RMAN備份概念-備份保留期策略-備份冗餘GUIIDE
- Backup And Recovery User's Guide-RMAN備份概念-備份保留期策略GUIIDE
- Oracle ADG環境下的RMAN備份策略Oracle
- rman備份的策略和croosschek delete基本命令delete
- RMAN結合Read Only、Exclude的備份策略
- Backup And Recovery User's Guide-備份RMAN備份-使用RMAN備份備份集GUIIDE
- 【RMAN】RMAN備份至ASMASM
- RMAN說,我能備份(14)--實戰RMAN備份
- RMAN相容性、控制檔案自動備份、儲存時間、備份策略、備份指令碼(二)指令碼
- RMAN備份原理
- Rman Scripts (Linux)Linux
- DP rman backup scripts
- Backup And Recovery User's Guide-備份RMAN備份-用RMAN備份映象拷貝備份GUIIDE
- Backup And Recovery User's Guide-RMAN備份概念-備份保留期策略-過期備份的批量刪除GUIIDE
- 一次磁碟空間緊缺的RMAN備份策略
- RMAN說,我能備份(3)--RMAN全庫備份和表空間備份
- rman備份和增量備份指令碼指令碼
- 備份保留策略