测试环境分别在虚拟机安装A,B主机
系统:linux 6.4,
数据库:Oracle 11g r2
A主机:安装oracle 11g r2数据库
B主机:只安装oracle 11g r2软件
第一步,运行下面rman命令备份数据库
run{
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO "/u01/app/dbback/config_%F";
allocate channel c1 type disk format "/u01/app/dbback/full_%U";
backup database tag "full_gpodb_data" FILESPERSET 10 PLUS ARCHIVELOG FILESPERSET 20 DELETE ALL INPUT;
release channel c1;
}
[root@bogon ~]# su - oracle
[oracle@bogon ~]$ rman target /
Recovery Manager: Release 11.2.0.1.0 - Production on Sat Oct 26 05:16:55 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: DB (DBID=1587060738) ------------记住这个DBID恢复数据库会用到
RMAN> run{
2> CONFIGURE CONTROLFILE AUTOBACKUP ON;
3> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO "/u01/app/dbback/config_%F";
4> allocate channel c1 type disk format "/u01/app/dbback/full_%U";
5> backup database tag "full_gpodb_data" FILESPERSET 10 PLUS ARCHIVELOG FILESPERSET 20 DELETE ALL INPUT;
6> release channel c1;
7> }
old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters are successfully stored
old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO "/u01/app/dbback/gpofullbak/%F";
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO "/u01/app/dbback/config_%F";
new RMAN configuration parameters are successfully stored
allocated channel: c1
channel c1: SID=47 device type=DISK
Starting backup at 26-OCT-13
current log archived
channel c1: starting archived log backup set
channel c1: specifying archived log(s) in backup set
input archived log thread=1 sequence=21 RECID=12 STAMP=829805117
channel c1: starting piece 1 at 26-OCT-13
channel c1: finished piece 1 at 26-OCT-13
piece handle=/u01/app/dbback/full_08onbkhu_1_1 tag=TAG20131026T052518 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:01
channel c1: deleting archived log(s)
archived log file name=/u01/app/archiv/1_21_823244933.dbf RECID=12 STAMP=829805117
Finished backup at 26-OCT-13
Starting backup at 26-OCT-13
channel c1: starting full datafile backup set
channel c1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/db/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/db/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/db/anfei01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/db/undotbs01.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/db/DB/datafile/o1_mf_dbs_91x4vt9f_.dbf
input datafile file number=00007 name=/u01/app/oracle/oradata/db/dbt.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/db/users01.dbf
channel c1: starting piece 1 at 26-OCT-13
channel c1: finished piece 1 at 26-OCT-13
piece handle=/u01/app/dbback/full_09onbkhv_1_1 tag=FULL_GPODB_DATA comment=NONE
channel c1: backup set complete, elapsed time: 00:01:36
Finished backup at 26-OCT-13
Starting backup at 26-OCT-13
current log archived
channel c1: starting archived log backup set
channel c1: specifying archived log(s) in backup set
input archived log thread=1 sequence=22 RECID=13 STAMP=829805216
channel c1: starting piece 1 at 26-OCT-13
channel c1: finished piece 1 at 26-OCT-13
piece handle=/u01/app/dbback/full_0aonbkl1_1_1 tag=TAG20131026T052657 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:01
channel c1: deleting archived log(s)
archived log file name=/u01/app/archiv/1_22_823244933.dbf RECID=13 STAMP=829805216
Finished backup at 26-OCT-13
Starting Control File and SPFILE Autobackup at 26-OCT-13
piece handle=/u01/app/dbback/config_c-1587060738-20131026-01 comment=NONE
Finished Control File and SPFILE Autobackup at 26-OCT-13
released channel: c1
RMAN>
更多详情见请继续阅读下一页的精彩内容: http://www.linuxidc.com/Linux/2013-10/91917p2.htmOracle基础教程之通过RMAN复制数据库 http://www.linuxidc.com/Linux/2013-07/87072.htmRMAN备份策略制定参考内容 http://www.linuxidc.com/Linux/2013-03/81695.htmRMAN备份学习笔记 http://www.linuxidc.com/Linux/2013-03/81892.htmOracle数据库备份加密 RMAN加密 http://www.linuxidc.com/Linux/2013-03/80729.htm
MongoDB数据修改总结Linux 6.4 系统删除Oracle 11g R2相关资讯 RMAN Oracle 11g R2
- RMAN故障一例(归档的备份,从不 (今 20:42)
- RMAN的FORMATA格式说明 (03月10日)
- CentOS 5.10安装Oracle 11G R2 (01月22日)
| - RMAN数据库迁移 (05月22日)
- 使用RMAN复制恢复开发库环境 (02月17日)
- Oracle 11g RMAN复制数据库的测试 (01月19日)
|
本文评论 查看全部评论 (0)