HQ_顯示RMAN備份資訊及日誌
vi /mesbk/scripts/backupLev0.sh
DATE=`date +%Y%m%d`
rman target/ cmdfile=/mesbk/scripts/rmanBackupLev0.rman msglog=/mesbk/log/rmanBackupLev0_$DATE.log
vi /mesbk/scripts/rmanBackupLev0.rman
run{
ALLOCATE CHANNEL ch1 TYPE disk;
BACKUP INCREMENTAL LEVEL 0 TAG 'DB0' DATABASE FORMAT '/mesbk/data/DB_0_%T_%s_%U' PLUS ARCHIVELOG FORMAT '/mesbk/archivelog/ARCH_0_%T_%s' DELETE ALL INPUT;
RELEASE CHANNEL ch1;
CROSSCHECK BACKUP;
CROSSCHECK ARCHIVELOG ALL;
DELETE NOPROMPT EXPIRED BACKUP;
DELETE EXPIRED ARCHIVELOG ALL;
REPORT OBSOLETE;
DELETE NOPROMPT OBSOLETE;
}
vi /mesbk/scripts/backupLev0_log.sh
DATE=`date -d "-1 day" +%Y%m%d`
mail_list='XX@YY.COM'
cat /mesbk/log/rmanBackupLev0_$DATE.log|mailx -s "MDB 192.168.3.3 0級備份過程明細" $mail_list
vi /mesbk/scripts/backupLev1.sh
DATE=`date +%Y%m%d`
rman target/ cmdfile=/mesbk/scripts/rmanBackupLev1.rman msglog=/mesbk/log/rmanBackupLev1_$DATE.log
vi /mesbk/scripts/rmanBackupLev1.rman
run{
ALLOCATE CHANNEL ch1 TYPE disk;
BACKUP INCREMENTAL LEVEL 1 TAG 'DB1' DATABASE FORMAT '/mesbk/data/DB_1_%T_%s_%U' PLUS ARCHIVELOG FORMAT '/mesbk/archivelog/ARCH_1_%T_%s' DELETE ALL INPUT;
RELEASE CHANNEL ch1;
CROSSCHECK BACKUP;
CROSSCHECK ARCHIVELOG ALL;
DELETE NOPROMPT EXPIRED BACKUP;
DELETE EXPIRED ARCHIVELOG ALL;
REPORT OBSOLETE;
DELETE NOPROMPT OBSOLETE;
}
vi /mesbk/scripts/backupLev1_log.sh
DATE=`date -d "-1 day" +%Y%m%d`
mail_list='XX@YY.COM'
cat /mesbk/log/rmanBackupLev1_$DATE.log|mailx -s "MDB 192.168.3.3 1級備份過程明細" $mail_list
rman target /
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/mesbk/controlfile/CNTRL_%T%F';
備份檔案資訊
/mesbk/data
/mesbk/archivelog
/mesbk/controlfile
[root@mesdb log]# crontab -l
0 21 * * 6 su - oracle -c "/mesbk/scripts/backupLev0.sh"
30 8 * * 0 su - oracle -c "sh /mesbk/scripts/backupLev0_log.sh>> /dev/null 2>&1"
0 23 * * 1,2,3,4,5,0 su - oracle -c "/mesbk/scripts/backupLev1.sh"
30 8 * * 1,2,3,4,5,6 su - oracle -c "sh /mesbk/scripts/backupLev1_log.sh>> /dev/null 2>&1"
DATE=`date +%Y%m%d`
rman target/ cmdfile=/mesbk/scripts/rmanBackupLev0.rman msglog=/mesbk/log/rmanBackupLev0_$DATE.log
vi /mesbk/scripts/rmanBackupLev0.rman
run{
ALLOCATE CHANNEL ch1 TYPE disk;
BACKUP INCREMENTAL LEVEL 0 TAG 'DB0' DATABASE FORMAT '/mesbk/data/DB_0_%T_%s_%U' PLUS ARCHIVELOG FORMAT '/mesbk/archivelog/ARCH_0_%T_%s' DELETE ALL INPUT;
RELEASE CHANNEL ch1;
CROSSCHECK BACKUP;
CROSSCHECK ARCHIVELOG ALL;
DELETE NOPROMPT EXPIRED BACKUP;
DELETE EXPIRED ARCHIVELOG ALL;
REPORT OBSOLETE;
DELETE NOPROMPT OBSOLETE;
}
vi /mesbk/scripts/backupLev0_log.sh
DATE=`date -d "-1 day" +%Y%m%d`
mail_list='XX@YY.COM'
cat /mesbk/log/rmanBackupLev0_$DATE.log|mailx -s "MDB 192.168.3.3 0級備份過程明細" $mail_list
vi /mesbk/scripts/backupLev1.sh
DATE=`date +%Y%m%d`
rman target/ cmdfile=/mesbk/scripts/rmanBackupLev1.rman msglog=/mesbk/log/rmanBackupLev1_$DATE.log
vi /mesbk/scripts/rmanBackupLev1.rman
run{
ALLOCATE CHANNEL ch1 TYPE disk;
BACKUP INCREMENTAL LEVEL 1 TAG 'DB1' DATABASE FORMAT '/mesbk/data/DB_1_%T_%s_%U' PLUS ARCHIVELOG FORMAT '/mesbk/archivelog/ARCH_1_%T_%s' DELETE ALL INPUT;
RELEASE CHANNEL ch1;
CROSSCHECK BACKUP;
CROSSCHECK ARCHIVELOG ALL;
DELETE NOPROMPT EXPIRED BACKUP;
DELETE EXPIRED ARCHIVELOG ALL;
REPORT OBSOLETE;
DELETE NOPROMPT OBSOLETE;
}
vi /mesbk/scripts/backupLev1_log.sh
DATE=`date -d "-1 day" +%Y%m%d`
mail_list='XX@YY.COM'
cat /mesbk/log/rmanBackupLev1_$DATE.log|mailx -s "MDB 192.168.3.3 1級備份過程明細" $mail_list
rman target /
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/mesbk/controlfile/CNTRL_%T%F';
備份檔案資訊
/mesbk/data
/mesbk/archivelog
/mesbk/controlfile
[root@mesdb log]# crontab -l
0 21 * * 6 su - oracle -c "/mesbk/scripts/backupLev0.sh"
30 8 * * 0 su - oracle -c "sh /mesbk/scripts/backupLev0_log.sh>> /dev/null 2>&1"
0 23 * * 1,2,3,4,5,0 su - oracle -c "/mesbk/scripts/backupLev1.sh"
30 8 * * 1,2,3,4,5,6 su - oracle -c "sh /mesbk/scripts/backupLev1_log.sh>> /dev/null 2>&1"
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30126024/viewspace-2128114/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- YD_顯示RMAN備份資訊及日誌
- RMAN備份歸檔日誌多份 %c
- RMAN備份及恢復歸檔日誌的語法
- RMAN備份歸檔日誌指令碼指令碼
- rman全庫備份備份歸檔日誌檔案
- nginx日誌中顯示cookie資訊NginxCookie
- oracle rman備份歸檔日誌需要先切換日誌嗎Oracle
- rman備份後為什麼要同時備份歸檔日誌
- mysql之 xtrabackup原理、備份日誌分析、備份資訊獲取MySql
- 用RMAN備份歸檔日誌時檢查歸檔日誌是否存在
- RMAN備份整庫和歸檔日誌的方法
- RMAN備份與恢復(新舊控制檔案及歸檔日誌)測試
- ASM+RMAN使用delete input備份日誌的問題ASMdelete
- 歸檔日誌大小 與使用rman 備份後的歸檔日誌產生的備份集大小的關係
- RMAN備份與恢復(新舊控制檔案及歸檔日誌)測試(敘)
- 備份之歸檔重做日誌備份
- RMAN備份資料檔案+控制檔案+歸檔日誌
- 備份歸檔日誌
- sqlserver的日誌備份SQLServer
- 請問RMAN備份異機還原,備份之後的歸檔日誌在RMAN中怎麼處理?
- ORACLE RMAN備份及還原Oracle
- Oracle設定多個歸檔路徑生成多份歸檔日誌,Rman備份時也只備份其中的一份歸檔日誌Oracle
- Oracle備份及備份策略及基於Linux下 Oracle 備份策略(RMAN)OracleLinux
- oracle rman不能自動刪除歸檔日誌備份解決Oracle
- RMAN備份恢復之歸檔日誌對BLOCKRECOVER的影響BloC
- Backup And Recovery User's Guide-備份資料庫-使用RMAN備份歸檔重做日誌GUIIDE資料庫
- 使用RMAN從相關的備份集、RMAN備份產生的日誌等獲取DBID的二種方法
- oracle備份把日誌錯Oracle
- 日誌傳送事務日誌備份設定
- RMAN筆記之查詢rman備份資訊狀態筆記
- Oracle RMAN 不完全恢復(只有資料檔案備份,丟失歸檔日誌備份)Oracle
- oracle rman備份及策略設定Oracle
- Backup And Recovery User's Guide-使用RMAN備份歸檔重做日誌GUIIDE
- 如何用rman備份不是預設目錄下的歸檔日誌,
- Backup And Recovery User's Guide-從RMAN開始-RMAN操作報表-列表顯示備份GUIIDE
- 備份歸檔日誌檔案
- oracle聯機熱備份的原理,及rman增量備份原理Oracle
- Oracle聯機熱備份的原理及rman增量備份原理Oracle