操作操作场景 源服务器 oel 6.3 11g r2 11.2.0.3目标服务器 oel 6.3 11g r2 11.2.0.3源服务器和目标服务器存放数据路
操作操作场景
源服务器 oel 6.3 11g r2 11.2.0.3
目标服务器 oel 6.3 11g r2 11.2.0.3
源服务器和目标服务器存放数据路径一样
源服务器
[oracle@mxq ~]$ rman target /
recovery manager: release 11.2.0.2.0 - production on sat may 16 08:51:05 2015
copyright (c) 1982, 2009, oracle and/or its affiliates. all rights reserved.
connected to target database: oracle11 (dbid=2573050700)
rman> run
{allocate channel orademo type disk maxpiecesize 1024m;
backup incremental level 0 as compressed backupset database include current controlfile tag='full' format '/home/oracle/db_%s_%p_%t' plus archivelog tag='arch_all' format '/home/oracle/arch_%s_%p_%t' delete input;
}2> 3> 4>
released channel: ora_disk_1
allocated channel: orademo
channel orademo: sid=147 device type=disk
starting backup at 16-may-15
current log archived
channel orademo: starting compressed archived log backup set
channel orademo: specifying archived log(s) in backup set
input archived log thread=1 sequence=96 recid=69 stamp=879840530
channel orademo: starting piece 1 at 16-may-15
channel orademo: finished piece 1 at 16-may-15
piece handle=/home/oracle/arch_59_1_879840531 tag=arch_all comment=none
channel orademo: backup set complete, elapsed time: 00:00:01
channel orademo: deleting archived log(s)
archived log file name=/orafile/arc/1_96_879804940.arc recid=69 stamp=879840530
finished backup at 16-may-15
starting backup at 16-may-15
channel orademo: starting compressed incremental level 0 datafile backup set
channel orademo: specifying datafile(s) in backup set
including current spfile in backup set
including current control file in backup set
input datafile file number=00002 name=/orafile/oradata/sysaux01.dbf
input datafile file number=00001 name=/orafile/oradata/system01.dbf
input datafile file number=00003 name=/orafile/oradata/undotbs01.dbf
input datafile file number=00004 name=/orafile/oradata/users01.dbf
channel orademo: starting piece 1 at 16-may-15
channel orademo: finished piece 1 at 16-may-15
piece handle=/home/oracle/db_60_1_879840533 tag=full comment=none
channel orademo: backup set complete, elapsed time: 00:02:55
finished backup at 16-may-15
starting backup at 16-may-15
current log archived
channel orademo: starting compressed archived log backup set
channel orademo: specifying archived log(s) in backup set
input archived log thread=1 sequence=97 recid=72 stamp=879840713
channel orademo: starting piece 1 at 16-may-15
channel orademo: finished piece 1 at 16-may-15
piece handle=/home/oracle/arch_61_1_879840714 tag=arch_all comment=none
channel orademo: backup set complete, elapsed time: 00:00:01
channel orademo: deleting archived log(s)
archived log file name=/orafile/arc/1_97_879804940.arc recid=72 stamp=879840713
finished backup at 16-may-15
released channel: orademo
把新的备份集拷贝到目标服务器
[oracle@mxq ~]$ cd /home/oracle/
[oracle@mxq ~]$ ls
arch_59_1_879840531 arch_61_1_879840714 db_60_1_879840533
[oracle@mxq ~]$ ll
total 248900
-rw-r----- 1 oracle oinstall 219648 may 16 08:08 arch_59_1_879840531
-rw-r----- 1 oracle oinstall 1256448 may 16 08:11 arch_61_1_879840714
-rw-r----- 1 oracle oinstall 253394944 may 16 08:11 db_60_1_879840533
[oracle@mxq ~]$ scp * [email protected]:/home/oracle/
[email protected]'s password:
arch_59_1_879840531 100% 215kb 214.5kb/s 00:00
arch_61_1_879840714 100% 1227kb 1.2mb/s 00:00
db_60_1_879840533 100% 242mb 13.4mb/s 00:18
目标服务器
提示:
如果已经数据文件、控制文件、在线日志文件、参数文件那么新删除掉在进行做恢复不然后面报错
[oracle@mxq ~]$ rman target /
recovery manager: release 11.2.0.2.0 - production on sun may 17 12:10:05 2015
copyright (c) 1982, 2009, oracle and/or its affiliates. all rights reserved.
connected to target database (not started)
rman> startup force nomount;
oracle instance started
total system global area 521936896 bytes
fixed size 2228072 bytes
variable size 159383704 bytes
database buffers 352321536 bytes
redo buffers 8003584 bytes
rman> restore spfile from '/home/oracle/db_54_1_879855779';
starting restore at 17-may-15
allocated channel: ora_disk_1
channel ora_disk_1: sid=134 device type=disk