完整的全库备份(供数据库迁移用)

这里的讲述一个完整的全库备份:备份中包括全部数据文件,控制文件,参数文件和归档日志文件。
这样就可以使用该备份进行数据库迁移。

---进入rman:
[oracle@oracle ~]$ rman target / 

Recovery Manager: Release 11.2.0.4.0 - Production on Mon Oct 10 17:49:51 2016

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORA11GR2 (DBID=238796283)

---进行全库备份:

RMAN> backup as backupset full database include current controlfile plus archivelog format '/u01/app/backup/db_%U.rmn' delete all input;

... ...

Starting backup at 10-OCT-16

current log archived

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=51 device type=DISK

channel ORA_DISK_1: starting archived log backup set

channel ORA_DISK_1: specifying archived log(s) in backup set

... ...

Starting backup at 10-OCT-16

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00001 name=/u01/app/oracle/oradata/ORA11GR2/system01.dbf

input datafile file number=00002 name=/u01/app/oracle/oradata/ORA11GR2/sysaux01.dbf

input datafile file number=00005 name=/u01/app/oracle/oradata/ORA11GR2/example01.dbf

input datafile file number=00003 name=/u01/app/oracle/oradata/ORA11GR2/undotbs01.dbf

input datafile file number=00006 name=/u01/app/oracle/oradata/ORA11GR2/ts_ora11gr2_01.dbf

input datafile file number=00007 name=/u01/app/oracle/oradata/ORA11GR2/test01.dbf

input datafile file number=00008 name=/u01/app/oracle/oradata/ORA11GR2/MYTEST02.dbf

input datafile file number=00009 name=/u01/app/oracle/oradata/ORA11GR2/ts_audit01.dbf

input datafile file number=00004 name=/u01/app/oracle/oradata/ORA11GR2/users01.dbf

channel ORA_DISK_1: starting piece 1 at 10-OCT-16

channel ORA_DISK_1: finished piece 1 at 10-OCT-16

piece handle=/u01/app/backup/db_0ari1305_1_1.rmn tag=TAG20161010T150437 comment=NONE

piece handle=/u01/app/backup/db_0bri135o_1_1.rmn tag=TAG20161010T150437 comment=NONE

... ...

Starting backup at 10-OCT-16

current log archived

using channel ORA_DISK_1

channel ORA_DISK_1: starting archived log backup set

channel ORA_DISK_1: specifying archived log(s) in backup set

input archived log thread=1 sequence=58 RECID=36 STAMP=924880062

channel ORA_DISK_1: starting piece 1 at 10-OCT-16

channel ORA_DISK_1: finished piece 1 at 10-OCT-16

piece handle=/u01/app/backup/db_0cri135u_1_1.rmn tag=TAG20161010T150742 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

channel ORA_DISK_1: deleting archived log(s)

archived log file name=/u01/app/FRA/ORA11GR2/archivelog/2016_10_10/o1_mf_1_58_czphkxox_.arc RECID=36 STAMP=924880062

Finished backup at 10-OCT-16

 

Starting Control File and SPFILE Autobackup at 10-OCT-16

piece handle=/u01/app/FRA/ORA11GR2/autobackup/2016_10_10/o1_mf_s_924880064_czphl11d_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 10-OCT-16

 

[oracle@oracle backup]$ ll

total 3983252

-rw-r----- 1 oracle oinstall  448043520 Sep 25 21:18 db_01rgnirt_1_1.rmn

-rw-r----- 1 oracle oinstall 1246969856 Sep 25 21:21 db_02rgnitc_1_1.rmn

-rw-r----- 1 oracle oinstall    9797632 Sep 25 21:21 db_03rgnj2j_1_1.rmn

-rw-r----- 1 oracle oinstall      60416 Sep 25 21:21 db_04rgnj2r_1_1.rmn

-rw-r----- 1 oracle oinstall  678985728 Oct 10 14:54 db_07ri12bs_1_1.rmn

-rw-r----- 1 oracle oinstall  396577792 Oct 10 15:04 db_09ri12u9_1_1.rmn

-rw-r----- 1 oracle oinstall 1284276224 Oct 10 15:07 db_0ari1305_1_1.rmn

-rw-r----- 1 oracle oinstall    9797632 Oct 10 15:07 db_0bri135o_1_1.rmn

-rw-r----- 1 oracle oinstall     303616 Oct 10 15:07 db_0cri135u_1_1.rmn

 

 

[oracle@oracle archivelog]$ ll

total 24

drwxr-x--- 2 oracle oinstall 4096 Oct 10 15:04 2016_10_05

drwxr-x--- 2 oracle oinstall 4096 Oct 10 15:04 2016_10_06

drwxr-x--- 2 oracle oinstall 4096 Oct 10 15:04 2016_10_07

drwxr-x--- 2 oracle oinstall 4096 Oct 10 15:04 2016_10_08

drwxr-x--- 2 oracle oinstall 4096 Oct 10 15:04 2016_10_09

drwxr-x--- 2 oracle oinstall 4096 Oct 10 15:07 2016_10_10

[oracle@oracle archivelog]$

 

[oracle@oracle autobackup]$ ll

total 8

drwxr-x--- 2 oracle oinstall 4096 Sep 26 14:03 2016_09_26

drwxr-x--- 2 oracle oinstall 4096 Oct 10 15:07 2016_10_10

[oracle@oracle autobackup]$ 

#全库备份完成,以上是各备份文件的信息。

 

--通过以上的备份集,可以把数据库迁移到一个空库里面,达到了数据库迁移(数据迁移)的目的。



来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31392094/viewspace-2128466/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/31392094/viewspace-2128466/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值