当前位置:Gxlcms > mysql > 设置rman实现归档备份在两个不同的目录

设置rman实现归档备份在两个不同的目录

时间:2021-07-01 10:21:17 帮助过:11人阅读

[oracle@edbjr2p1 admin]$ rman target /catalog rc_admin/rc_admin@emrep Recovery Manager: Release 10.2.0.1.0 -Production on Sat Apr 12 09:41:41 2014 Copyright (c) 1982, 2005, Oracle. All rights reserved. connected to target database: PROD(DB

[oracle@edbjr2p1 admin]$ rman target /catalog rc_admin/rc_admin@emrep

Recovery Manager: Release 10.2.0.1.0 -Production on Sat Apr 12 09:41:41 2014

Copyright (c) 1982, 2005, Oracle. All rights reserved.

connected to target database: PROD(DBID=255136845)

connected to recovery catalog database

RMAN>configure archivelog backup copies for device type disk to 2;

old RMAN configuration parameters:

CONFIGURE ARCHIVELOG BACKUP COPIES FORDEVICE TYPE DISK TO 2;

new RMAN configuration parameters:

CONFIGURE ARCHIVELOG BACKUP COPIES FORDEVICE TYPE DISK TO 2;

new RMAN configuration parameters aresuccessfully stored

starting full resync of recovery catalog

full resync complete

RMAN>configure channel 1 device type disk format '/u01/%U','/u01/app/%U';

old RMAN configuration parameters:

CONFIGURE CHANNEL 1 DEVICE TYPE DISKFORMAT '/u01/%U', '/u01/app/%U';

new RMAN configuration parameters:

CONFIGURE CHANNEL 1 DEVICE TYPE DISKFORMAT '/u01/%U', '/u01/app/%U';

new RMAN configuration parameters aresuccessfully stored

starting full resync of recovery catalog

full resync complete

RMAN> backuparchivelog all;

Starting backup at 12-APR-14

current log archived

configuration for DISK channel 2 is ignored

allocated channel: ORA_DISK_1

channel ORA_DISK_1: sid=196 devtype=DISK

skipping archive log file/home/oracle/flash/PROD/archivelog/2014_03_31/o1_mf_1_6_9ml8yy6m_.arc; alreadybacked up 2 time(s)

略。。

channel ORA_DISK_1: starting archive logbackupset

channel ORA_DISK_1: specifying archivelog(s) in backup set

input archive log thread=1 sequence=38recid=33 stamp=844681323

channel ORA_DISK_1: starting piece 1 at12-APR-14

channel ORA_DISK_1: finished piece 1 at12-APR-14 with 2 copies and tag TAG20140412T094204

piece handle=/u01/0mp5hk3c_1_1 comment=NONE

piece handle=/u01/app/0mp5hk3c_1_2 comment=NONE

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

Finished backup at 12-APR-14

Starting Control File and SPFILE Autobackupat 12-APR-14

piecehandle=/home/oracle/backup/control/cf_c-255136845-20140412-03 comment=NONE

Finished Control File and SPFILE Autobackupat 12-APR-14

此时配置完备份archivelog可以看到archivelog备份到了两个位置。

但是对于备份数据文件会看到数据文件只是备份到了一个目录:

RMAN> backupdatafile 2;

Starting backup at 12-APR-14

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafilebackupset

channel ORA_DISK_1: specifying datafile(s)in backupset

input datafile fno=00002name=/u01/app/oracle/oradata/PROD/disk1/undotbs01.dbf

channel ORA_DISK_1: starting piece 1 at12-APR-14

channel ORA_DISK_1: finished piece 1 at12-APR-14

piece handle=/u01/0op5hk42_1_1 tag=TAG20140412T094226comment=NONE

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

Finished backup at 12-APR-14

Starting Control File and SPFILE Autobackupat 12-APR-14

piecehandle=/home/oracle/backup/control/cf_c-255136845-20140412-04 comment=NONE

Finished Control File and SPFILE Autobackupat 12-APR-14

人气教程排行