RMAN恢复原理

首先还是得理解Oracle数据库恢复的一个原理。数据库恢复是指将数据库恢复到一个一致性的状态,整个恢复操作可以分为两个步骤,数据库修复(RESTORE)和恢复(RECOVER)
Oracle官方文档上关于Restore和Recover的解释:
The two most important RMAN commands used in database recovery are:

  • RESTORE, which retrieves files from RMAN backups based on the contents of the RMAN repository
  • RECOVER, which performs complete or point-in-time media recovery using available datafiles and redo logs.
    Restore是指将要恢复的文件从备份集中读取出来。
    Recover是指应用所有重做日志,将数据库恢复到崩溃前的状态,或者应用部分REDO,将数据库恢复到指定的时间点。
    image
    上图是一个最典型的恢复过程,数据库在SCN=100时执行了数据库备份,在SCN=500时数据库出现介质错误,需要通过备份进行恢复

    操作步骤:

  1. 首先使用SCN=100时创建的数据库备份将数据库恢复到备份时的状态,这个操作就是修复(RESTORE)
  2. 然后重新应用SCN 100~500之间生成的所有重做日志,这个操作就是恢复(RECOVER),最后数据库被恢复到崩溃前的状态。
    由上可知,Oracle数据库中的备份恢复必然是先有备份,然后才能做恢复的操作。不管是RMAN备份恢复,或者是用户管理的备份和恢复,恢复操作都是从备份时间点向前进行恢复,不可能直接将当前状态向后恢复到之前的某个时间点(Oracle 10g R2新推出的Flashback Database特性开始支持,直接从当前时间点向之前的时间点恢复)

RMAN如何选择备份集

很多新接触RMAN的朋友都会有这样的疑问:我执行过很多次备份,早也备份是晚也备份,昨天也备份今天也备份,在恢复的时候,RMAN怎么知道从哪个备份集中选择文件用来恢复呢?
答案其实很简单,RMAN一开始也不知道,它只是遵循固定的规则,按照你的要求去寻找合适的备份集罢了,首先是寻找最近的可用的备份集(如果没有指定UNTIL子句则从最近的备份开始,如果指定了UNTIL,则从满足UNTIL的备份集开始),如果能找到,那么运气不错,恢复将会继续正常进行,如果找到了多个,还有更加细致的规则,从中选择一个RMAN觉着最优的备份集来做恢复(如优先选择镜像复制,因为RMAN认为这样恢复时会更快)。如果最终一个备份集都没找到,嘿嘿,那就只有一个选择了:报错

RMAN能做哪些恢复

之前的文章Oracle数据库备份与恢复 - RMAN备份里有写到RMAN可以做多种备份,包括:

  1. 整库备份;
  2. 表空间的备份;
  3. 数据文件的备份;
  4. 控制文件备份;
  5. 归档文件的备份;
  6. 初始化参数文件的备份;
  7. 对备份集备份;

对于恢复,RMAN中提供了多种不同级别的恢复方式,可以恢复整个数据库,恢复某个或某几个表空间,某个或某几个数据文件,单独恢复控制文件,初始化参数文件,或者归档文件等等。能用RMAN备份的都能恢复

RMAN之恢复

  1. 对数据库进行完全恢复

如果当前数据库只剩下控制文件和SPFILE,其他数据文件因为某些原因导致全部丢失,不过幸运的是之前创建过整库的备份,并且执行备份操作之后,所有的归档文件和重做日志文件都还在,这种情况下你就可以将数据库恢复到崩溃前那一刻的状态,而这种恢复方式,就叫做完全介质恢复。
做数据库完全恢复,需要数据库处于MOUNT状态(如果数据库处于OPEN状态会报ORA-19573错误)

1
2
3
4
5
6
7
8
9
10
11
12
13
#启动数据库到加载状态:
RMAN> STARTUP MOUNT;
connected to target database (not started)
Oracle instance started
database mounted
Total System Global Area 1071333376 bytes
Fixed Size 1375792 bytes
Variable Size 637534672 bytes
Database Buffers 427819008 bytes
Redo Buffers 4603904 bytes

执行恢复操作(恢复分两步,先执行RESTORE DATABASE;,在执行RECOVER DATABASE;)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
RMAN> restore database;
Starting restore at 15-JUL-15
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=63 device type=DISK
channel ORA_DISK_1: restoring datafile 00001
input datafile copy RECID=2 STAMP=884555266 file name=E:\APP\TIANPAN\FLASH_RECOVERY_AREA\PTIAN\DATAFILE\O1_MF_SYSTEM_BSTBH904_.DBF
destination for restore of datafile 00001: E:\APP\TIANPAN\ORADATA\PTIAN\SYSTEM01.DBF
channel ORA_DISK_1: copied datafile copy of datafile 00001
output file name=E:\APP\TIANPAN\ORADATA\PTIAN\SYSTEM01.DBF RECID=0 STAMP=0
channel ORA_DISK_1: restoring datafile 00002
input datafile copy RECID=3 STAMP=884555292 file name=E:\APP\TIANPAN\FLASH_RECOVERY_AREA\PTIAN\DATAFILE\O1_MF_SYSAUX_BSTBJDFQ_.DBF
destination for restore of datafile 00002: E:\APP\TIANPAN\ORADATA\PTIAN\SYSAUX01.DBF
channel ORA_DISK_1: copied datafile copy of datafile 00002
output file name=E:\APP\TIANPAN\ORADATA\PTIAN\SYSAUX01.DBF RECID=0 STAMP=0
channel ORA_DISK_1: restoring datafile 00003
input datafile copy RECID=4 STAMP=884555305 file name=E:\APP\TIANPAN\FLASH_RECOVERY_AREA\PTIAN\DATAFILE\O1_MF_UNDOTBS1_BSTBK5V1_.DBF
destination for restore of datafile 00003: E:\APP\TIANPAN\ORADATA\PTIAN\UNDOTBS01.DBF
channel ORA_DISK_1: copied datafile copy of datafile 00003
output file name=E:\APP\TIANPAN\ORADATA\PTIAN\UNDOTBS01.DBF RECID=0 STAMP=0
channel ORA_DISK_1: restoring datafile 00004
input datafile copy RECID=7 STAMP=884555314 file name=E:\APP\TIANPAN\FLASH_RECOVERY_AREA\PTIAN\DATAFILE\O1_MF_USERS_BSTBKKVB_.DBF
destination for restore of datafile 00004: E:\APP\TIANPAN\ORADATA\PTIAN\USERS01.DBF
channel ORA_DISK_1: copied datafile copy of datafile 00004
output file name=E:\APP\TIANPAN\ORADATA\PTIAN\USERS01.DBF RECID=0 STAMP=0
channel ORA_DISK_1: restoring datafile 00005
input datafile copy RECID=5 STAMP=884555312 file name=E:\APP\TIANPAN\FLASH_RECOVERY_AREA\PTIAN\DATAFILE\O1_MF_EXAMPLE_BSTBKF80_.DBF
destination for restore of datafile 00005: E:\APP\TIANPAN\ORADATA\PTIAN\EXAMPLE01.DBF
channel ORA_DISK_1: copied datafile copy of datafile 00005
output file name=E:\APP\TIANPAN\ORADATA\PTIAN\EXAMPLE01.DBF RECID=0 STAMP=0
Finished restore at 15-JUL-15

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
RMAN> RECOVER DATABASE;
Starting recover at 15-JUL-15
using channel ORA_DISK_1
starting media recovery
archived log for thread 1 with sequence 105 is already on disk as file E:\APP\TIANPAN\FLASH_RECOVERY_AREA\PTIAN\ARCHIVELOG\2015_07_09\O1_MF_1_105_BSWC39YH_.ARC
archived log for thread 1 with sequence 106 is already on disk as file E:\APP\TIANPAN\FLASH_RECOVERY_AREA\PTIAN\ARCHIVELOG\2015_07_10\O1_MF_1_106_BSYCRLNG_.ARC
archived log for thread 1 with sequence 107 is already on disk as file E:\APP\TIANPAN\FLASH_RECOVERY_AREA\PTIAN\ARCHIVELOG\2015_07_11\O1_MF_1_107_BT10F9Y9_.ARC
archived log for thread 1 with sequence 108 is already on disk as file E:\APP\TIANPAN\FLASH_RECOVERY_AREA\PTIAN\ARCHIVELOG\2015_07_11\O1_MF_1_108_BT1M9PW5_.ARC
archived log for thread 1 with sequence 109 is already on disk as file E:\APP\TIANPAN\FLASH_RECOVERY_AREA\PTIAN\ARCHIVELOG\2015_07_15\O1_MF_1_109_BTCH29LR_.ARC
archived log file name=E:\APP\TIANPAN\FLASH_RECOVERY_AREA\PTIAN\ARCHIVELOG\2015_07_09\O1_MF_1_105_BSWC39YH_.ARC thread=1 sequence=105
archived log file name=E:\APP\TIANPAN\FLASH_RECOVERY_AREA\PTIAN\ARCHIVELOG\2015_07_10\O1_MF_1_106_BSYCRLNG_.ARC thread=1 sequence=106
archived log file name=E:\APP\TIANPAN\FLASH_RECOVERY_AREA\PTIAN\ARCHIVELOG\2015_07_11\O1_MF_1_107_BT10F9Y9_.ARC thread=1 sequence=107
media recovery complete, elapsed time: 00:00:22
Finished recover at 15-JUL-15
RMAN>
1
2
3
4
5
6
#打开数据库:
RMAN> ALTER DATABASE OPEN;
database opened
RMAN>
  1. 表空间恢复

在执行恢复之前,如果被操作的表空间未处于OFFLINE状态,必须首先通过ALTER TABLESPACE tablespace_name OFFLINE语句将其置为脱机

1
2
3
4
5
6
7
8
9
10
11
SQL> select * from v$tablespace;
TS# NAME INCLUDED_IN_DATABASE_BACKUP BIGFILE FLASHBACK_ON ENCRYPT_IN_BACKUP
---------- ------------------------------ --------------------------- ------- ------------ -----------------
0 SYSTEM YES NO YES
1 SYSAUX YES NO YES
2 UNDOTBS1 YES NO YES
4 USERS YES NO YES
3 TEMP NO NO YES
6 EXAMPLE YES NO YES
6 rows selected
SQL>

以恢复Example表空间为例

1
2
3
4
5
操作步骤如下:
RMAN> SQL 'ALTER TABLESPACE EXAMPLE OFFLINE IMMEDIATE';
RMAN> RESTORE TABLESPACE EXAMPLE;
RMAN> RECOVER TABLESPACE EXAMPLE;
RMAN> SQL 'ALTER TABLESPACE EXAMPLE ONLINE';

上述执行的四个脚本,表示将表空间置于OFFLINE状态,执行RESTORE命令,执行RECOVER命令,最后将表空间置为ONLINE状态
示例:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
RMAN> SQL 'ALTER TABLESPACE EXAMPLE OFFLINE IMMEDIATE';
sql statement: ALTER TABLESPACE EXAMPLE OFFLINE IMMEDIATE
RMAN> RESTORE TABLESPACE EXAMPLE;
Starting restore at 15-JUL-15
using channel ORA_DISK_1
channel ORA_DISK_1: restoring datafile 00005
input datafile copy RECID=5 STAMP=884555312 file name=E:\APP\TIANPAN\FLASH_RECOVERY_AREA\PTIAN\DATAFILE\O1_MF_EXAMPLE_BSTBKF80_.DBF
destination for restore of datafile 00005: E:\APP\TIANPAN\ORADATA\PTIAN\EXAMPLE01.DBF
channel ORA_DISK_1: copied datafile copy of datafile 00005
output file name=E:\APP\TIANPAN\ORADATA\PTIAN\EXAMPLE01.DBF RECID=0 STAMP=0
Finished restore at 15-JUL-15
RMAN> RECOVER TABLESPACE EXAMPLE;
Starting recover at 15-JUL-15
using channel ORA_DISK_1
starting media recovery
archived log for thread 1 with sequence 105 is already on disk as file E:\APP\TIANPAN\FLASH_RECOVERY_AREA\PTIAN\ARCHIVELOG\2015_07_09\O1_MF_1_105_BSWC39YH_.ARC
archived log for thread 1 with sequence 106 is already on disk as file E:\APP\TIANPAN\FLASH_RECOVERY_AREA\PTIAN\ARCHIVELOG\2015_07_10\O1_MF_1_106_BSYCRLNG_.ARC
archived log for thread 1 with sequence 107 is already on disk as file E:\APP\TIANPAN\FLASH_RECOVERY_AREA\PTIAN\ARCHIVELOG\2015_07_11\O1_MF_1_107_BT10F9Y9_.ARC
archived log for thread 1 with sequence 108 is already on disk as file E:\APP\TIANPAN\FLASH_RECOVERY_AREA\PTIAN\ARCHIVELOG\2015_07_11\O1_MF_1_108_BT1M9PW5_.ARC
archived log for thread 1 with sequence 109 is already on disk as file E:\APP\TIANPAN\FLASH_RECOVERY_AREA\PTIAN\ARCHIVELOG\2015_07_15\O1_MF_1_109_BTCH29LR_.ARC
archived log file name=E:\APP\TIANPAN\FLASH_RECOVERY_AREA\PTIAN\ARCHIVELOG\2015_07_09\O1_MF_1_105_BSWC39YH_.ARC thread=1 sequence=105
archived log file name=E:\APP\TIANPAN\FLASH_RECOVERY_AREA\PTIAN\ARCHIVELOG\2015_07_10\O1_MF_1_106_BSYCRLNG_.ARC thread=1 sequence=106
archived log file name=E:\APP\TIANPAN\FLASH_RECOVERY_AREA\PTIAN\ARCHIVELOG\2015_07_11\O1_MF_1_107_BT10F9Y9_.ARC thread=1 sequence=107
media recovery complete, elapsed time: 00:00:03
Finished recover at 15-JUL-15
RMAN> SQL 'ALTER TABLESPACE EXAMPLE ONLINE';
sql statement: ALTER TABLESPACE EXAMPLE ONLINE
RMAN>

  1. 数据文件的恢复

恢复表空间实际就是恢复其所对应的数据文件(一个表空间可能对应多个数据文件),因此恢复数据文件的操作步骤与上极其相似
同样在恢复操作之前,如果需要被恢复的数据文件未处于OFFLINE状态,需要通过ALTER DATABASE DATAFILE … OFFLINE语句将其置为脱机。

1
2
3
4
5
6
7
8
9
10
SQL> select file#, name,status, enabled from v$datafile;
FILE# NAME STATUS ENABLED
---------- -------------------------------------------------------------------------------- ------- ----------
1 E:\APP\TIANPAN\ORADATA\PTIAN\SYSTEM01.DBF SYSTEM READ WRITE
2 E:\APP\TIANPAN\ORADATA\PTIAN\SYSAUX01.DBF ONLINE READ WRITE
3 E:\APP\TIANPAN\ORADATA\PTIAN\UNDOTBS01.DBF ONLINE READ WRITE
4 E:\APP\TIANPAN\ORADATA\PTIAN\USERS01.DBF ONLINE READ WRITE
5 E:\APP\TIANPAN\ORADATA\PTIAN\EXAMPLE01.DBF ONLINE READ WRITE
SQL>

以恢复datafile 5为例

1
2
3
4
RMAN> SQL 'ALTER DATABASE DATAFILE 5 OFFLINE';
RMAN> RESTORE DATAFILE 5;
RMAN> RECOVER DATAFILE 5;
RMAN> SQL 'ALTER DATABASE DATAFILE 5 ONLINE';

示例:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
RMAN> SQL 'ALTER DATABASE DATAFILE 5 OFFLINE';
sql statement: ALTER DATABASE DATAFILE 5 OFFLINE
RMAN> RESTORE DATAFILE 5;
Starting restore at 15-JUL-15
using channel ORA_DISK_1
channel ORA_DISK_1: restoring datafile 00005
input datafile copy RECID=5 STAMP=884555312 file name=E:\APP\TIANPAN\FLASH_RECOVERY_AREA\PTIAN\DATAFILE\O1_MF_EXAMPLE_BSTBKF80_.DBF
destination for restore of datafile 00005: E:\APP\TIANPAN\ORADATA\PTIAN\EXAMPLE01.DBF
channel ORA_DISK_1: copied datafile copy of datafile 00005
output file name=E:\APP\TIANPAN\ORADATA\PTIAN\EXAMPLE01.DBF RECID=0 STAMP=0
Finished restore at 15-JUL-15
RMAN> RECOVER DATAFILE 5;
Starting recover at 15-JUL-15
using channel ORA_DISK_1
starting media recovery
archived log for thread 1 with sequence 105 is already on disk as file E:\APP\TIANPAN\FLASH_RECOVERY_AREA\PTIAN\ARCHIVELOG\2015_07_09\O1_MF_1_105_BSWC39YH_.ARC
archived log for thread 1 with sequence 106 is already on disk as file E:\APP\TIANPAN\FLASH_RECOVERY_AREA\PTIAN\ARCHIVELOG\2015_07_10\O1_MF_1_106_BSYCRLNG_.ARC
archived log for thread 1 with sequence 107 is already on disk as file E:\APP\TIANPAN\FLASH_RECOVERY_AREA\PTIAN\ARCHIVELOG\2015_07_11\O1_MF_1_107_BT10F9Y9_.ARC
archived log for thread 1 with sequence 108 is already on disk as file E:\APP\TIANPAN\FLASH_RECOVERY_AREA\PTIAN\ARCHIVELOG\2015_07_11\O1_MF_1_108_BT1M9PW5_.ARC
archived log for thread 1 with sequence 109 is already on disk as file E:\APP\TIANPAN\FLASH_RECOVERY_AREA\PTIAN\ARCHIVELOG\2015_07_15\O1_MF_1_109_BTCH29LR_.ARC
archived log file name=E:\APP\TIANPAN\FLASH_RECOVERY_AREA\PTIAN\ARCHIVELOG\2015_07_09\O1_MF_1_105_BSWC39YH_.ARC thread=1 sequence=105
archived log file name=E:\APP\TIANPAN\FLASH_RECOVERY_AREA\PTIAN\ARCHIVELOG\2015_07_10\O1_MF_1_106_BSYCRLNG_.ARC thread=1 sequence=106
archived log file name=E:\APP\TIANPAN\FLASH_RECOVERY_AREA\PTIAN\ARCHIVELOG\2015_07_11\O1_MF_1_107_BT10F9Y9_.ARC thread=1 sequence=107
media recovery complete, elapsed time: 00:00:04
Finished recover at 15-JUL-15
RMAN> SQL 'ALTER DATABASE DATAFILE 5 ONLINE';
sql statement: ALTER DATABASE DATAFILE 5 ONLINE
RMAN>

  1. 归档日志文件的恢复

恢复归档文件也是使用RESTORE命令,如果只是为了在恢复数据文件后应用归档文件,那并不需要手动对归档文件进行恢复,RMAN会在RECOVER的时候自动对适当的归档进行恢复
恢复归档文件也非常灵活,RMAN的RECOVER命令中提供了多种限定条件,可以精确指定恢复哪些备份的归档文件,例如,恢复归档序号为20到30之间的归档文件:

1
RMAN> RESTORE ARCHIVELOG SEQUENCE BETWEEN 20 AND 30;

示例:

1
2
3
4
5
6
7
8
RMAN> RUN{
2> SET ARCHIVELOG DESTINATION TO 'F:\ORACLE\BACKUP\ARCLOG1';
3> RESTORE ARCHIVELOG SEQUENCE BETWEEN 15 AND 20;
4> SET ARCHIVELOG DESTINATION TO 'F:\ORACLE\BACKUP\ARCLOG2';
5> RESTORE ARCHIVELOG SEQUENCE BETWEEN 21 AND 30;
6> SET ARCHIVELOG DESTINATION TO 'F:\ORACLE\BACKUP\ARCLOG3';
7> RESTORE ARCHIVELOG SEQUENCE BETWEEN 31 AND 40;
8> }

  1. 控制文件的恢复

Oracle数据库的控制文件个头不大(最大不超过20000个数据块),Oracle数据库实例启动后(即启动到NOMOUNT模式),要通过加载控制文件确定数据文件、重做日志文件的路径(进入到MOUNT模式),然后才能打开数据库(Finally,OPEN数据库)。因此,没有了控制文件,想顺利启动Oracle数据库是不可能的。
控制文件中并不是只有数据文件和重做日志文件的路径,还包括数据库名称、数据库创建信息、表空间信息、数据文件状态、日志文件信息、备份信息、检查点信息等。
该文件不仅在数据库启动过程中需要,在Oracle数据库运行过程中,控制文件也需要发挥重要作用,如记录检查点的相关信息、归档文件路径、备份信息(假如采用RMAN执行备份的话),以及数据库发生结构修改(流行词汇形容叫领导班子调整,类似添加删除表空间、数据文件、日志文件)等操作都需要同步到控制文件。如果在Oracle数据库运行过程中,由于某些原因导致控制文件无法访问,则数据库也无法继续正常工作。
控制文件是一个二进制文件,不能直接通过文本编辑工具修改,一般这个文件中的内容都是由Oracle自行维护。一个Oracle数据库至少要拥有一个控制文件,鉴于其重要地位,Oracle对其的保护有加,在默认情况下,控制文件就会有两、三份冗余(就是一模一样的文件存在两、三份),这几份文件的一致性由Oracle自动维护,冗余的数量和冗余文件的位置可以由DBA指定,Oracle建议控制文件至少要有两份冗余,并且存储在不同的磁盘中,以提高该文件的可用性。

查询当前数据库拥有的控制文件:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
SQL> SELECT NAME FROM V$CONTROLFILE;
NAME
--------------------------------------------------------------------------------
/u01/data/orcl/control01.ctl
/u01/data/orcl/control02.ctl
SQL> SHOW PARAMETER CONTROL_FILES;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_files string /u01/data/orcl/control01.ctl,
/u01/data/orcl/control02.ctl
SQL>

如果通知文件丢失,可以通过以下集中方式恢复:

  • 从自动备份中恢复

由于没有了控制文件,目标数据库只能启动到NOMOUNT状态,不过在启动数据库之前,必须首先通过SET命令设置DBID:

1
2
3
4
5
6
7
8
#获取数据库的DBID
SQL> SELECT DBID FROM V$DATABASE;
DBID
----------
1455780274
SQL>

1
2
3
RMAN> SET DBID=1455780274;
RMAN> STARTUP NOMOUNT;
RMAN> RESTORE CONTROLFILE FROM AUTOBACKUP;
  • 从备份集中恢复
1
2
3
4
5
#在启动数据库之前,必须首先通过SET命令设置DBID
RMAN> SET DBID=1415261003;
RMAN> STARTUP NOMOUNT;
#指定控制文件所在备份片段的详细路径
RMAN> RESTORE CONTROLFILE FROM '/u01/app/oracle/product/11.2.0.4/db_1/dbs/05rtn873_1_1';
  1. SPFILE初始化参数文件

虽然DBA可以通过BACKUP SPFILE命令手动备份服务器端的初始化参数文件,不过一般都不会主动执行,因为RMAN在备份控制文件时会自动备份SPFILE
相对于其他文件的备份,SPFILE最不重要(或者说最容易被恢复)。除了可以通过备份方式保障拥有可用的SPFILE外,数据库在运行过程中也会在Alert文件中留下数据库启动时的初始化参数信息。甚至即使这些都丢失了也没有关系,如果你对数据库足够了解,还是能够手动地创建出一份SPFILE出来,只是麻烦一些罢了。即使是运行中的数据库丢失了SPFILE也不会导致数据库崩溃(只不过下次启动时如果还没有能创建出一份来,数据库就起不来。

通过RMAN恢复初始化参数的过程与恢复控制文件极其类似

1
2
3
4
RMAN> SET DBID=1415261003;
RMAN> STARTUP NOMOUNT;
#执行恢复命令,将SPFILE恢复到默认路径下
RMAN> RESTORE SPFILE FROM AUTOBACKUP;

参考:http://blog.csdn.net/pan_tian/article/details/46896017


本文出自”Jack Wang Blog”:http://www.yfshare.vip/2017/02/28/Oracle数据库备份与恢复-RMAN恢复/