首页 > 代码库 > 某系统数据库的增量备份策略恢复测试过程

某系统数据库的增量备份策略恢复测试过程

上半年,公司服务器虚拟化项目已经上线,所以近期的主要工作重心以P2V(物理机到虚拟机)的迁移为主,作为业务系统核心的后台数据库的迁移更是这项工作的重中之重。

本次数据库的迁移工作主要包含两部分的内容:一是跨平台(windows2003到OEL6)的数据库版本升级(Oracle 9.2.0.6到Oracle 11.2.0.4);二是数据迁移。由于这些变迁,伴随着发生了许多操作方式(习惯)的变化,最显著的一点就是备份方式的变更了。之前的备份方式是采用exp逻辑导出的方式,就目前业务运行的情形来看,此种备份方式无疑是不合适的,在新的数据库平台上,采用RMAN备份的方式来执行此项工作。

1.备份

有关数据库的备份策略简单介绍如下:

  • 周日进行0级增量备份;
  • 周三进行1级累积备份;
  • 周一/二/四/五/六进行1级增量备份;

2.恢复

关于备份策略的恢复测试,经过初步验证,被认定为是具有可操作性的。这里记录一下操作过程,以备不时之需:

  1. 模拟场景:2016年9月2日,发现数据库无法启动且无法修复。由于备份数据都是放在共享存储上,无需涉及备份集在源数据库和目标数据库之间的拷贝问题。
  2. 恢复工作:找到距离9月2日最近的一个星期日(2016年8月28日),利用8月28日的0级增量备份和8月29、30、31、9月1日的增量进行恢复。(利用8月28日的0级,8月31日的1级累积,9月1日的1级增量)

2.1 在目标数据库的$ORACLE_HOME/dbs下创建pfile(或init.ora),只需配置初始化参数db_name即可,启动数据库到nomount状态。
2.2 恢复源数据库的参数文件后关闭数据库。

$ rman target /Recovery Manager: Release 11.2.0.4.0 - Production on Fri Sep 2 09:55:46 2016Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.connected to target database (not started)RMAN> startup nomountstartup failed: ORA-01078: failure in processing system parametersLRM-00109: could not open parameter file ‘/u01/app/oracle/product/11.2.0/db_1/dbs/initp201.ora‘starting Oracle instance without parameter file for retrieval of spfileOracle instance startedTotal System Global Area    1068937216 bytesFixed Size                     2260088 bytesVariable Size                285213576 bytesDatabase Buffers             775946240 bytesRedo Buffers                   5517312 bytesRMAN> restore spfile from ‘/u03/P201/20160828/ctl_spfile_c-2516054087-20160828-00‘;Starting restore at 02-SEP-16using target database control file instead of recovery catalogallocated channel: ORA_DISK_1channel ORA_DISK_1: SID=429 device type=DISKchannel ORA_DISK_1: restoring spfile from AUTOBACKUP /u03/P201/20160828/ctl_spfile_c-2516054087-20160828-00channel ORA_DISK_1: SPFILE restore from AUTOBACKUP completeFinished restore at 02-SEP-16RMAN> shutdown immediateOracle instance shut downRMAN> exit

说明:如有必要,使用create pfile from spfile;命令将参数文件内存转储出来,以检查参数文件中的所有参数设置是否已在目标数据库(目录结构、内存设置等等)上满足。

2.3 用恢复出来的参数文件将数据库启动到nomount状态,然后恢复控制文件。

SQL> startup nomountORACLE instance started.Total System Global Area 2137886720 bytesFixed Size                  2254952 bytesVariable Size            1291847576 bytesDatabase Buffers          838860800 bytesRedo Buffers                4923392 bytesSQL> exitDisconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing options[oracle@TCBH-DB-RECOVERY-241 dbs]$ [oracle@TCBH-DB-RECOVERY-241 dbs]$ [oracle@TCBH-DB-RECOVERY-241 dbs]$ [oracle@TCBH-DB-RECOVERY-241 dbs]$ [oracle@TCBH-DB-RECOVERY-241 dbs]$ [oracle@TCBH-DB-RECOVERY-241 dbs]$ rman target /Recovery Manager: Release 11.2.0.4.0 - Production on Fri Sep 2 09:58:41 2016Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.connected to target database: P201 (not mounted)RMAN> restore controlfile from ‘/u03/P201/20160828/ctl_spfile_c-2516054087-20160828-00‘;Starting restore at 02-SEP-16using target database control file instead of recovery catalogallocated channel: ORA_DISK_1channel ORA_DISK_1: SID=197 device type=DISKchannel ORA_DISK_1: restoring control filechannel ORA_DISK_1: restore complete, elapsed time: 00:00:01output file name=/u02/oradata/p201/control01.ctloutput file name=/u02/oradata/p201/control02.ctlFinished restore at 02-SEP-16

2.4 启动数据库到mount状态,执行restore和recover操作。

RMAN> alter database mount;database mountedreleased channel: ORA_DISK_1RMAN> restore database;Starting restore at 02-SEP-16allocated channel: ORA_DISK_1channel ORA_DISK_1: SID=197 device type=DISKchannel ORA_DISK_1: starting datafile backup set restorechannel ORA_DISK_1: specifying datafile(s) to restore from backup setchannel ORA_DISK_1: restoring datafile 00001 to /u02/oradata/p201/system01.dbfchannel ORA_DISK_1: restoring datafile 00003 to /u02/oradata/p201/zabbix01.dbfchannel ORA_DISK_1: restoring datafile 00005 to /u02/oradata/p201/data01.dbfchannel ORA_DISK_1: restoring datafile 00008 to /u02/oradata/p201/indx02.dbfchannel ORA_DISK_1: restoring datafile 00009 to /u02/oradata/p201/tools01.dbfchannel ORA_DISK_1: reading from backup piece /u03/P201/20160828/full_P201_20160828_162.bakchannel ORA_DISK_1: piece handle=/u03/P201/20160828/full_P201_20160828_162.bak tag=TAG20160828T220022channel ORA_DISK_1: restored backup piece 1channel ORA_DISK_1: restore complete, elapsed time: 00:00:45channel ORA_DISK_1: starting datafile backup set restorechannel ORA_DISK_1: specifying datafile(s) to restore from backup setchannel ORA_DISK_1: restoring datafile 00002 to /u02/oradata/p201/sysaux01.dbfchannel ORA_DISK_1: restoring datafile 00006 to /u02/oradata/p201/data02.dbfchannel ORA_DISK_1: restoring datafile 00007 to /u02/oradata/p201/indx01.dbfchannel ORA_DISK_1: restoring datafile 00010 to /u02/oradata/p201/rbsg01.dbfchannel ORA_DISK_1: reading from backup piece /u03/P201/20160828/full_P201_20160828_161.bakchannel ORA_DISK_1: piece handle=/u03/P201/20160828/full_P201_20160828_161.bak tag=TAG20160828T220022channel ORA_DISK_1: restored backup piece 1channel ORA_DISK_1: restore complete, elapsed time: 00:00:55Finished restore at 02-SEP-16RMAN> recover database;Starting recover at 02-SEP-16using channel ORA_DISK_1starting media recoverychannel ORA_DISK_1: starting archived log restore to default destinationchannel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=498channel ORA_DISK_1: reading from backup piece /u03/P201/20160828/arch_P201_20160828_163.bakchannel ORA_DISK_1: piece handle=/u03/P201/20160828/arch_P201_20160828_163.bak tag=TAG20160828T220317channel ORA_DISK_1: restored backup piece 1channel ORA_DISK_1: restore complete, elapsed time: 00:00:01archived log file name=/u02/archivelog/1_498_918787465.dbf thread=1 sequence=498unable to find archived logarchived log thread=1 sequence=499RMAN-00571: ===========================================================RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============RMAN-00571: ===========================================================RMAN-03002: failure of recover command at 09/02/2016 10:08:56RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 499 and starting SCN of 5596358985699

说明:这里出现错误信息,提示缺少归档。这是必然的,因为此时的控制文件是2016年8月28日备份的(0级增量,相当于一个全备),控制文件中当然不会记录8月29日、8月30日、8月31日、9月1日的增量备份信息(catalog),我们需要使用 catalog start with 命令将之前的备份集信息重新导入到当前控制文件中,然后就可以进行后续的恢复了。

RMAN> catalog start with ‘/u03/P201/‘; --在P201后一定要有/using target database control file instead of recovery catalogsearching for all files that match the pattern /u03/P201/List of Files Unknown to the Database=====================================File Name: /u03/P201/20160828/ctl_spfile_c-2516054087-20160828-00File Name: /u03/P201/20160829/arch_P201_20160829_165.bakFile Name: /u03/P201/20160829/arch_P201_20160829_166.bakFile Name: /u03/P201/20160829/full_P201_20160829_167.bakFile Name: /u03/P201/20160829/full_P201_20160829_168.bakFile Name: /u03/P201/20160829/arch_P201_20160829_169.bakFile Name: /u03/P201/20160829/ctl_spfile_c-2516054087-20160829-00File Name: /u03/P201/20160830/arch_P201_20160830_171.bakFile Name: /u03/P201/20160830/arch_P201_20160830_172.bakFile Name: /u03/P201/20160830/full_P201_20160830_174.bakFile Name: /u03/P201/20160830/full_P201_20160830_173.bakFile Name: /u03/P201/20160830/arch_P201_20160830_175.bakFile Name: /u03/P201/20160830/ctl_spfile_c-2516054087-20160830-00File Name: /u03/P201/20160831/arch_P201_20160831_177.bakFile Name: /u03/P201/20160831/arch_P201_20160831_178.bakFile Name: /u03/P201/20160831/full_P201_20160831_180.bakFile Name: /u03/P201/20160831/full_P201_20160831_179.bakFile Name: /u03/P201/20160831/arch_P201_20160831_181.bakFile Name: /u03/P201/20160831/ctl_spfile_c-2516054087-20160831-00File Name: /u03/P201/20160901/arch_P201_20160901_183.bakFile Name: /u03/P201/20160901/arch_P201_20160901_184.bakFile Name: /u03/P201/20160901/full_P201_20160901_185.bakFile Name: /u03/P201/20160901/full_P201_20160901_186.bakFile Name: /u03/P201/20160901/arch_P201_20160901_187.bakFile Name: /u03/P201/20160901/ctl_spfile_c-2516054087-20160901-00Do you really want to catalog the above files (enter YES or NO)? ycataloging files...cataloging doneList of Cataloged Files=======================File Name: /u03/P201/20160828/ctl_spfile_c-2516054087-20160828-00File Name: /u03/P201/20160829/arch_P201_20160829_165.bakFile Name: /u03/P201/20160829/arch_P201_20160829_166.bakFile Name: /u03/P201/20160829/full_P201_20160829_167.bakFile Name: /u03/P201/20160829/full_P201_20160829_168.bakFile Name: /u03/P201/20160829/arch_P201_20160829_169.bakFile Name: /u03/P201/20160829/ctl_spfile_c-2516054087-20160829-00File Name: /u03/P201/20160830/arch_P201_20160830_171.bakFile Name: /u03/P201/20160830/arch_P201_20160830_172.bakFile Name: /u03/P201/20160830/full_P201_20160830_174.bakFile Name: /u03/P201/20160830/full_P201_20160830_173.bakFile Name: /u03/P201/20160830/arch_P201_20160830_175.bakFile Name: /u03/P201/20160830/ctl_spfile_c-2516054087-20160830-00File Name: /u03/P201/20160831/arch_P201_20160831_177.bakFile Name: /u03/P201/20160831/arch_P201_20160831_178.bakFile Name: /u03/P201/20160831/full_P201_20160831_180.bakFile Name: /u03/P201/20160831/full_P201_20160831_179.bakFile Name: /u03/P201/20160831/arch_P201_20160831_181.bakFile Name: /u03/P201/20160831/ctl_spfile_c-2516054087-20160831-00File Name: /u03/P201/20160901/arch_P201_20160901_183.bakFile Name: /u03/P201/20160901/arch_P201_20160901_184.bakFile Name: /u03/P201/20160901/full_P201_20160901_185.bakFile Name: /u03/P201/20160901/full_P201_20160901_186.bakFile Name: /u03/P201/20160901/arch_P201_20160901_187.bakFile Name: /u03/P201/20160901/ctl_spfile_c-2516054087-20160901-00RMAN> recover database;Starting recover at 02-SEP-16allocated channel: ORA_DISK_1channel ORA_DISK_1: SID=197 device type=DISKchannel ORA_DISK_1: starting incremental datafile backup set restorechannel ORA_DISK_1: specifying datafile(s) to restore from backup setdestination for restore of datafile 00001: /u02/oradata/p201/system01.dbfdestination for restore of datafile 00003: /u02/oradata/p201/zabbix01.dbfdestination for restore of datafile 00005: /u02/oradata/p201/data01.dbfdestination for restore of datafile 00008: /u02/oradata/p201/indx02.dbfdestination for restore of datafile 00009: /u02/oradata/p201/tools01.dbfchannel ORA_DISK_1: reading from backup piece /u03/P201/20160831/full_P201_20160831_180.bakchannel ORA_DISK_1: piece handle=/u03/P201/20160831/full_P201_20160831_180.bak tag=TAG20160831T220017channel ORA_DISK_1: restored backup piece 1channel ORA_DISK_1: restore complete, elapsed time: 00:00:03channel ORA_DISK_1: starting incremental datafile backup set restorechannel ORA_DISK_1: specifying datafile(s) to restore from backup setdestination for restore of datafile 00002: /u02/oradata/p201/sysaux01.dbfdestination for restore of datafile 00006: /u02/oradata/p201/data02.dbfdestination for restore of datafile 00007: /u02/oradata/p201/indx01.dbfdestination for restore of datafile 00010: /u02/oradata/p201/rbsg01.dbfchannel ORA_DISK_1: reading from backup piece /u03/P201/20160831/full_P201_20160831_179.bakchannel ORA_DISK_1: piece handle=/u03/P201/20160831/full_P201_20160831_179.bak tag=TAG20160831T220017channel ORA_DISK_1: restored backup piece 1channel ORA_DISK_1: restore complete, elapsed time: 00:00:07channel ORA_DISK_1: starting incremental datafile backup set restorechannel ORA_DISK_1: specifying datafile(s) to restore from backup setdestination for restore of datafile 00002: /u02/oradata/p201/sysaux01.dbfdestination for restore of datafile 00006: /u02/oradata/p201/data02.dbfdestination for restore of datafile 00007: /u02/oradata/p201/indx01.dbfdestination for restore of datafile 00010: /u02/oradata/p201/rbsg01.dbfchannel ORA_DISK_1: reading from backup piece /u03/P201/20160901/full_P201_20160901_185.bakchannel ORA_DISK_1: piece handle=/u03/P201/20160901/full_P201_20160901_185.bak tag=TAG20160901T220016channel ORA_DISK_1: restored backup piece 1channel ORA_DISK_1: restore complete, elapsed time: 00:00:07channel ORA_DISK_1: starting incremental datafile backup set restorechannel ORA_DISK_1: specifying datafile(s) to restore from backup setdestination for restore of datafile 00001: /u02/oradata/p201/system01.dbfdestination for restore of datafile 00003: /u02/oradata/p201/zabbix01.dbfdestination for restore of datafile 00005: /u02/oradata/p201/data01.dbfdestination for restore of datafile 00008: /u02/oradata/p201/indx02.dbfdestination for restore of datafile 00009: /u02/oradata/p201/tools01.dbfchannel ORA_DISK_1: reading from backup piece /u03/P201/20160901/full_P201_20160901_186.bakchannel ORA_DISK_1: piece handle=/u03/P201/20160901/full_P201_20160901_186.bak tag=TAG20160901T220016channel ORA_DISK_1: restored backup piece 1channel ORA_DISK_1: restore complete, elapsed time: 00:00:03starting media recoverychannel ORA_DISK_1: starting archived log restore to default destinationchannel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=499channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=500channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=501channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=502channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=503channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=504channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=505channel ORA_DISK_1: reading from backup piece /u03/P201/20160829/arch_P201_20160829_165.bakchannel ORA_DISK_1: piece handle=/u03/P201/20160829/arch_P201_20160829_165.bak tag=TAG20160829T220007channel ORA_DISK_1: restored backup piece 1channel ORA_DISK_1: restore complete, elapsed time: 00:00:07archived log file name=/u02/archivelog/1_499_918787465.dbf thread=1 sequence=499archived log file name=/u02/archivelog/1_500_918787465.dbf thread=1 sequence=500archived log file name=/u02/archivelog/1_501_918787465.dbf thread=1 sequence=501archived log file name=/u02/archivelog/1_502_918787465.dbf thread=1 sequence=502archived log file name=/u02/archivelog/1_503_918787465.dbf thread=1 sequence=503archived log file name=/u02/archivelog/1_504_918787465.dbf thread=1 sequence=504archived log file name=/u02/archivelog/1_505_918787465.dbf thread=1 sequence=505channel ORA_DISK_1: starting archived log restore to default destinationchannel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=506channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=507channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=508channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=509channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=510channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=511channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=512channel ORA_DISK_1: reading from backup piece /u03/P201/20160829/arch_P201_20160829_166.bakchannel ORA_DISK_1: piece handle=/u03/P201/20160829/arch_P201_20160829_166.bak tag=TAG20160829T220007channel ORA_DISK_1: restored backup piece 1channel ORA_DISK_1: restore complete, elapsed time: 00:00:03archived log file name=/u02/archivelog/1_506_918787465.dbf thread=1 sequence=506archived log file name=/u02/archivelog/1_507_918787465.dbf thread=1 sequence=507archived log file name=/u02/archivelog/1_508_918787465.dbf thread=1 sequence=508archived log file name=/u02/archivelog/1_509_918787465.dbf thread=1 sequence=509archived log file name=/u02/archivelog/1_510_918787465.dbf thread=1 sequence=510archived log file name=/u02/archivelog/1_511_918787465.dbf thread=1 sequence=511archived log file name=/u02/archivelog/1_512_918787465.dbf thread=1 sequence=512channel ORA_DISK_1: starting archived log restore to default destinationchannel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=513channel ORA_DISK_1: reading from backup piece /u03/P201/20160829/arch_P201_20160829_169.bakchannel ORA_DISK_1: piece handle=/u03/P201/20160829/arch_P201_20160829_169.bak tag=TAG20160829T220138channel ORA_DISK_1: restored backup piece 1channel ORA_DISK_1: restore complete, elapsed time: 00:00:01archived log file name=/u02/archivelog/1_513_918787465.dbf thread=1 sequence=513channel ORA_DISK_1: starting archived log restore to default destinationchannel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=514channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=515channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=516channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=517channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=518channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=519channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=520channel ORA_DISK_1: reading from backup piece /u03/P201/20160830/arch_P201_20160830_171.bakchannel ORA_DISK_1: piece handle=/u03/P201/20160830/arch_P201_20160830_171.bak tag=TAG20160830T220007channel ORA_DISK_1: restored backup piece 1channel ORA_DISK_1: restore complete, elapsed time: 00:00:07archived log file name=/u02/archivelog/1_514_918787465.dbf thread=1 sequence=514archived log file name=/u02/archivelog/1_515_918787465.dbf thread=1 sequence=515archived log file name=/u02/archivelog/1_516_918787465.dbf thread=1 sequence=516archived log file name=/u02/archivelog/1_517_918787465.dbf thread=1 sequence=517archived log file name=/u02/archivelog/1_518_918787465.dbf thread=1 sequence=518archived log file name=/u02/archivelog/1_519_918787465.dbf thread=1 sequence=519archived log file name=/u02/archivelog/1_520_918787465.dbf thread=1 sequence=520channel ORA_DISK_1: starting archived log restore to default destinationchannel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=521channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=522channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=523channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=524channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=525channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=526channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=527channel ORA_DISK_1: reading from backup piece /u03/P201/20160830/arch_P201_20160830_172.bakchannel ORA_DISK_1: piece handle=/u03/P201/20160830/arch_P201_20160830_172.bak tag=TAG20160830T220007channel ORA_DISK_1: restored backup piece 1channel ORA_DISK_1: restore complete, elapsed time: 00:00:03archived log file name=/u02/archivelog/1_521_918787465.dbf thread=1 sequence=521archived log file name=/u02/archivelog/1_522_918787465.dbf thread=1 sequence=522archived log file name=/u02/archivelog/1_523_918787465.dbf thread=1 sequence=523archived log file name=/u02/archivelog/1_524_918787465.dbf thread=1 sequence=524archived log file name=/u02/archivelog/1_525_918787465.dbf thread=1 sequence=525archived log file name=/u02/archivelog/1_526_918787465.dbf thread=1 sequence=526archived log file name=/u02/archivelog/1_527_918787465.dbf thread=1 sequence=527channel ORA_DISK_1: starting archived log restore to default destinationchannel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=528channel ORA_DISK_1: reading from backup piece /u03/P201/20160830/arch_P201_20160830_175.bakchannel ORA_DISK_1: piece handle=/u03/P201/20160830/arch_P201_20160830_175.bak tag=TAG20160830T220202channel ORA_DISK_1: restored backup piece 1channel ORA_DISK_1: restore complete, elapsed time: 00:00:01archived log file name=/u02/archivelog/1_528_918787465.dbf thread=1 sequence=528channel ORA_DISK_1: starting archived log restore to default destinationchannel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=529channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=530channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=531channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=532channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=533channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=534channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=535channel ORA_DISK_1: reading from backup piece /u03/P201/20160831/arch_P201_20160831_177.bakchannel ORA_DISK_1: piece handle=/u03/P201/20160831/arch_P201_20160831_177.bak tag=TAG20160831T220008channel ORA_DISK_1: restored backup piece 1channel ORA_DISK_1: restore complete, elapsed time: 00:00:07archived log file name=/u02/archivelog/1_529_918787465.dbf thread=1 sequence=529archived log file name=/u02/archivelog/1_530_918787465.dbf thread=1 sequence=530archived log file name=/u02/archivelog/1_531_918787465.dbf thread=1 sequence=531archived log file name=/u02/archivelog/1_532_918787465.dbf thread=1 sequence=532archived log file name=/u02/archivelog/1_533_918787465.dbf thread=1 sequence=533archived log file name=/u02/archivelog/1_534_918787465.dbf thread=1 sequence=534archived log file name=/u02/archivelog/1_535_918787465.dbf thread=1 sequence=535channel ORA_DISK_1: starting archived log restore to default destinationchannel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=536channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=537channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=538channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=539channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=540channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=541channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=542channel ORA_DISK_1: reading from backup piece /u03/P201/20160831/arch_P201_20160831_178.bakchannel ORA_DISK_1: piece handle=/u03/P201/20160831/arch_P201_20160831_178.bak tag=TAG20160831T220008channel ORA_DISK_1: restored backup piece 1channel ORA_DISK_1: restore complete, elapsed time: 00:00:03archived log file name=/u02/archivelog/1_536_918787465.dbf thread=1 sequence=536archived log file name=/u02/archivelog/1_537_918787465.dbf thread=1 sequence=537archived log file name=/u02/archivelog/1_538_918787465.dbf thread=1 sequence=538archived log file name=/u02/archivelog/1_539_918787465.dbf thread=1 sequence=539archived log file name=/u02/archivelog/1_540_918787465.dbf thread=1 sequence=540archived log file name=/u02/archivelog/1_541_918787465.dbf thread=1 sequence=541archived log file name=/u02/archivelog/1_542_918787465.dbf thread=1 sequence=542channel ORA_DISK_1: starting archived log restore to default destinationchannel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=543channel ORA_DISK_1: reading from backup piece /u03/P201/20160831/arch_P201_20160831_181.bakchannel ORA_DISK_1: piece handle=/u03/P201/20160831/arch_P201_20160831_181.bak tag=TAG20160831T220155channel ORA_DISK_1: restored backup piece 1channel ORA_DISK_1: restore complete, elapsed time: 00:00:01archived log file name=/u02/archivelog/1_543_918787465.dbf thread=1 sequence=543channel ORA_DISK_1: starting archived log restore to default destinationchannel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=544channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=545channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=546channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=547channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=548channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=549channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=550channel ORA_DISK_1: reading from backup piece /u03/P201/20160901/arch_P201_20160901_183.bakchannel ORA_DISK_1: piece handle=/u03/P201/20160901/arch_P201_20160901_183.bak tag=TAG20160901T220008channel ORA_DISK_1: restored backup piece 1channel ORA_DISK_1: restore complete, elapsed time: 00:00:07archived log file name=/u02/archivelog/1_544_918787465.dbf thread=1 sequence=544archived log file name=/u02/archivelog/1_545_918787465.dbf thread=1 sequence=545archived log file name=/u02/archivelog/1_546_918787465.dbf thread=1 sequence=546archived log file name=/u02/archivelog/1_547_918787465.dbf thread=1 sequence=547archived log file name=/u02/archivelog/1_548_918787465.dbf thread=1 sequence=548archived log file name=/u02/archivelog/1_549_918787465.dbf thread=1 sequence=549archived log file name=/u02/archivelog/1_550_918787465.dbf thread=1 sequence=550channel ORA_DISK_1: starting archived log restore to default destinationchannel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=551channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=552channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=553channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=554channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=555channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=556channel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=557channel ORA_DISK_1: reading from backup piece /u03/P201/20160901/arch_P201_20160901_184.bakchannel ORA_DISK_1: piece handle=/u03/P201/20160901/arch_P201_20160901_184.bak tag=TAG20160901T220008channel ORA_DISK_1: restored backup piece 1channel ORA_DISK_1: restore complete, elapsed time: 00:00:03archived log file name=/u02/archivelog/1_551_918787465.dbf thread=1 sequence=551archived log file name=/u02/archivelog/1_552_918787465.dbf thread=1 sequence=552archived log file name=/u02/archivelog/1_553_918787465.dbf thread=1 sequence=553archived log file name=/u02/archivelog/1_554_918787465.dbf thread=1 sequence=554archived log file name=/u02/archivelog/1_555_918787465.dbf thread=1 sequence=555archived log file name=/u02/archivelog/1_556_918787465.dbf thread=1 sequence=556archived log file name=/u02/archivelog/1_557_918787465.dbf thread=1 sequence=557channel ORA_DISK_1: starting archived log restore to default destinationchannel ORA_DISK_1: restoring archived logarchived log thread=1 sequence=558channel ORA_DISK_1: reading from backup piece /u03/P201/20160901/arch_P201_20160901_187.bakchannel ORA_DISK_1: piece handle=/u03/P201/20160901/arch_P201_20160901_187.bak tag=TAG20160901T220157channel ORA_DISK_1: restored backup piece 1channel ORA_DISK_1: restore complete, elapsed time: 00:00:01archived log file name=/u02/archivelog/1_558_918787465.dbf thread=1 sequence=558unable to find archived logarchived log thread=1 sequence=559RMAN-00571: ===========================================================RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============RMAN-00571: ===========================================================RMAN-03002: failure of recover command at 09/02/2016 10:17:05RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 559 and starting SCN of 5596398978002

2.5 以resetlog方式打开数据库。

RMAN> alter database open resetlogs;database opened

 

某系统数据库的增量备份策略恢复测试过程