使用RMAN增量更新備份實現快速還原
OS:Oracle Linux
DB: Oracle 11.2.0.4.0
增量更新備份:先做一個完整的映像備份,然後定期做增量更新備份,並將其應用到之前的完整映像備份,以獲得更新版備份。還原時直接切換到映像備份。
備份前最好設定RMAN的autobackup,可能需要恢復控制檔案。
在歸檔模式下的操作:
第一次備份:
RMAN下執行
第一次將會做完整映像備份。
第二次:
測試還原:
先啟動到mount模式,再切換資料庫,進入RMAN
接下來,因為是在歸檔模式下,所以需要對資料庫recover,相關參考:http://blog.itpub.net/22621861/viewspace-1685967/
此時,如果在RMAN下reporte obsolete,原來的資料檔案將作為過期的映像備份,可以delete obsolete刪除。
重新切換回原來的資料檔案路徑
先做映像備份
啟動到mount模式,切換資料庫
recover,open
另外,建議驗證備份
最後,可以delete obsolete,刪除過期備份。
DB: Oracle 11.2.0.4.0
增量更新備份:先做一個完整的映像備份,然後定期做增量更新備份,並將其應用到之前的完整映像備份,以獲得更新版備份。還原時直接切換到映像備份。
備份前最好設定RMAN的autobackup,可能需要恢復控制檔案。
在歸檔模式下的操作:
第一次備份:
RMAN下執行
點選(此處)摺疊或開啟
- backup incremental level 1 for recover of copy with tag 'FLASH' database plus archivelog;
# 備份映像預設在FRA中的datafile目錄下
第二次:
點選(此處)摺疊或開啟
-
backup incremental level 1 for recover of copy with tag 'FLASH' database plus archivelog;
- recover copy of database with tag 'FLASH';
測試還原:
先啟動到mount模式,再切換資料庫,進入RMAN
點選(此處)摺疊或開啟
-
shutdown immediate
-
startup mount
- switch database to copy;
點選(此處)摺疊或開啟
-
run {
set until sequence 7 thread 1;
recover database;
alter database open resetlogs;
}
重新切換回原來的資料檔案路徑
先做映像備份
點選(此處)摺疊或開啟
- RMAN> backup as copy database format '/u01/app/oracle/oradata/prod/%U.dbf'
點選(此處)摺疊或開啟
-
RMAN> shutdown immediate
-
RMAN> startup mount
- RMAN> switch database to copy;
點選(此處)摺疊或開啟
-
RMAN> recover database;
- RMAN> alter database open;
點選(此處)摺疊或開啟
- RMAN> validate datafilecopy all;
Starting validate at 2016-04-01 10:50:03
using channel ORA_DISK_1
channel ORA_DISK_1: starting validation of datafile
channel ORA_DISK_1: including datafile copy of datafile 00005 in backup set
input file name=/u01/app/oracle/flash_recovery_area/PROD/datafile/o1_mf_sh_chspst8m_.dbf
channel ORA_DISK_1: including datafile copy of datafile 00004 in backup set
input file name=/u01/app/oracle/flash_recovery_area/PROD/datafile/o1_mf_users_chspy1xh_.dbf
channel ORA_DISK_1: including datafile copy of datafile 00001 in backup set
input file name=/u01/app/oracle/flash_recovery_area/PROD/datafile/o1_mf_system_chspzhjs_.dbf
channel ORA_DISK_1: including datafile copy of datafile 00002 in backup set
input file name=/u01/app/oracle/flash_recovery_area/PROD/datafile/o1_mf_sysaux_chsq095k_.dbf
channel ORA_DISK_1: including datafile copy of datafile 00003 in backup set
input file name=/u01/app/oracle/flash_recovery_area/PROD/datafile/o1_mf_undotbs1_chsq12rn_.dbf
channel ORA_DISK_1: validation complete, elapsed time: 00:00:26
List of Datafile Copies
=======================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
1 OK 0 16052 41600 4410291
File Name: /u01/app/oracle/flash_recovery_area/PROD/datafile/o1_mf_system_chspzhjs_.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 16866
Index 0 5514
Other 0 3168
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
2 OK 0 4459 41600 4410083
File Name: /u01/app/oracle/flash_recovery_area/PROD/datafile/o1_mf_sysaux_chsq095k_.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 16335
Index 0 15214
Other 0 5592
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
3 OK 0 1 34816 4410289
File Name: /u01/app/oracle/flash_recovery_area/PROD/datafile/o1_mf_undotbs1_chsq12rn_.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 0
Index 0 0
Other 0 34815
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
4 OK 0 63873 64000 3153
File Name: /u01/app/oracle/flash_recovery_area/PROD/datafile/o1_mf_users_chspy1xh_.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 0
Index 0 0
Other 0 127
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
5 OK 0 19125 239232 4409306
File Name: /u01/app/oracle/flash_recovery_area/PROD/datafile/o1_mf_sh_chspst8m_.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 179405
Index 0 38502
Other 0 2200
Finished validate at 2016-04-01 10:50:29
using channel ORA_DISK_1
channel ORA_DISK_1: starting validation of datafile
channel ORA_DISK_1: including datafile copy of datafile 00005 in backup set
input file name=/u01/app/oracle/flash_recovery_area/PROD/datafile/o1_mf_sh_chspst8m_.dbf
channel ORA_DISK_1: including datafile copy of datafile 00004 in backup set
input file name=/u01/app/oracle/flash_recovery_area/PROD/datafile/o1_mf_users_chspy1xh_.dbf
channel ORA_DISK_1: including datafile copy of datafile 00001 in backup set
input file name=/u01/app/oracle/flash_recovery_area/PROD/datafile/o1_mf_system_chspzhjs_.dbf
channel ORA_DISK_1: including datafile copy of datafile 00002 in backup set
input file name=/u01/app/oracle/flash_recovery_area/PROD/datafile/o1_mf_sysaux_chsq095k_.dbf
channel ORA_DISK_1: including datafile copy of datafile 00003 in backup set
input file name=/u01/app/oracle/flash_recovery_area/PROD/datafile/o1_mf_undotbs1_chsq12rn_.dbf
channel ORA_DISK_1: validation complete, elapsed time: 00:00:26
List of Datafile Copies
=======================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
1 OK 0 16052 41600 4410291
File Name: /u01/app/oracle/flash_recovery_area/PROD/datafile/o1_mf_system_chspzhjs_.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 16866
Index 0 5514
Other 0 3168
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
2 OK 0 4459 41600 4410083
File Name: /u01/app/oracle/flash_recovery_area/PROD/datafile/o1_mf_sysaux_chsq095k_.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 16335
Index 0 15214
Other 0 5592
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
3 OK 0 1 34816 4410289
File Name: /u01/app/oracle/flash_recovery_area/PROD/datafile/o1_mf_undotbs1_chsq12rn_.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 0
Index 0 0
Other 0 34815
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
4 OK 0 63873 64000 3153
File Name: /u01/app/oracle/flash_recovery_area/PROD/datafile/o1_mf_users_chspy1xh_.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 0
Index 0 0
Other 0 127
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
5 OK 0 19125 239232 4409306
File Name: /u01/app/oracle/flash_recovery_area/PROD/datafile/o1_mf_sh_chspst8m_.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 179405
Index 0 38502
Other 0 2200
Finished validate at 2016-04-01 10:50:29
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22621861/viewspace-2073201/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【RMAN】使用增量備份更新資料庫備份映象資料庫
- mysql備份還原-基於binlog的增量備份還原MySql
- HBase 增量備份和還原工具
- 透過innobackupex實現對MySQL的增量備份與還原MySql
- Oracle RMAN 增量備份Oracle
- ORACLE RMAN備份及還原Oracle
- rman備份和增量備份指令碼指令碼
- rman增量備份指令碼指令碼
- Oracle 11g RMAN備份-增量備份Oracle
- RMAN說,我能備份(9)--RMAN增量備份與備份保留策略
- mysql利用binlog增量備份,還原例項MySql
- 轉享:使用Xtrabackup實現MySQL備份和還原。MySql
- Backup And Recovery User's Guide-RMAN備份概念-增量備份-累積增量備份GUIIDE
- Backup And Recovery User's Guide-RMAN備份概念-增量備份-差異增量備份GUIIDE
- Backup And Recovery User's Guide-RMAN備份概念-增量備份-多級增量備份GUIIDE
- 使用RMAN增量備份前滾STANDBY資料庫資料庫
- oracle實驗記錄 (恢復-rman增量備份)Oracle
- Backup And Recovery User's Guide-建立和更新增量備份-增量更新備份GUIIDE
- 【RMAN】利用備份片還原資料庫資料庫
- Backup And Recovery User's Guide-RMAN備份概念-增量備份-增量備份演算法GUIIDE演算法
- Backup And Recovery User's Guide-RMAN備份概念-增量備份-累積增量備份-練習GUIIDE
- 12C還原使用舊版本RMAN所建立的備份
- dg丟失歸檔,使用rman增量備份恢復
- 【RMAN】利用備份片還原資料庫(上)資料庫
- 【RMAN】利用備份片還原資料庫(中)資料庫
- 【RMAN】利用備份片還原資料庫(下)資料庫
- 【RMAN】RMAN備份恢復3 RMAN增量備份指令碼與crontab計劃任務指令碼
- oracle10g RMAN增量備份策略Oracle
- 詳解MYSQL的備份還原(PHP實現)MySqlPHP
- Backup And Recovery User's Guide-建立和更新增量備份-增量更新備份:基本例項GUIIDE
- Backup And Recovery User's Guide-RMAN備份概念-增量備份GUIIDE
- oracle聯機熱備份的原理,及rman增量備份原理Oracle
- Oracle聯機熱備份的原理及rman增量備份原理Oracle
- Rman增量壓縮備份來解決備份空間不足
- 透過RMAN備份standby database成功恢復還原Database
- 【RMAN】利用備份片還原資料庫(中)-附加資料庫
- Backup And Recovery User's Guide-建立和更新增量備份-增量更新備份:高階例項GUIIDE
- [Rman]Oracle Rman增量備份Level012指令碼Oracle指令碼