rman 备份默认路径小结

oracle11g,  rman备份的路径应该是这样的优先级
备份语句中指定的format  > rman 中显现的configure channel device type disk format '/oracle/orclarch/%U_%d'的路径 > 闪回恢复区>$ORACLE_HOME/dbs  
下面实验过程:
1,备份语句中如果指定了format,那么优先选择指定的路径,
2,备份语句中如果没有指定了format,那么选择rman 中配置的默认路径,
例如:
RMAN> configure channel device type disk format ' /oracle/orclarch/%U_%d ';  
RMAN> show all;


RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT    '/oracle/orclarch/%U_%d';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/oracle/app/oracle/product/11.2/db_1/dbs/snapcf_orcl.f'; # default

RMAN> backup tablespace system  ;

Starting backup at 08-APR-16
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=21 device type=DISK
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=/oradata/orcl/system01.dbf
channel ORA_DISK_1: starting piece 1 at 08-APR-16
channel ORA_DISK_1: finished piece 1 at 08-APR-16
piece handle= /oracle/orclarch/36r2hgkp_1_1_ORCL tag=TAG20160408T161521 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 08-APR-16
channel ORA_DISK_1: finished piece 1 at 08-APR-16
piece handle= /oracle/orclarch/37r2hglj_1_1_ORCL tag=TAG20160408T161521 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 08-APR-16
3,如果rman没有显现的配置备份路径,也就是没有如下操作,
RMAN>configure channel device type disk format ' /oracle/orclarch/%U_%d';  
如果这种情况下,数据库开启了闪回恢复区,如下所示表示开启了闪回区。
SQL> show parameter recover

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      /oracle/flsh_area
db_recovery_file_dest_size           big integer 3G
recovery_parallelism                 integer     0
如下备份到了闪回恢复区目录下,并且又在后面自动生成了以实例名ORCL的子目录。
RMAN> backup tablespace system;

Starting backup at 08-APR-16
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=83 device type=DISK
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=/oradata/orcl/system01.dbf
channel ORA_DISK_1: starting piece 1 at 08-APR-16
channel ORA_DISK_1: finished piece 1 at 08-APR-16
piece handle= /oracle/flsh_area/ORCL/backupset/2016_04_08/o1_mf_nnndf_TAG20160408T163916_cjgvkock_.bkp tag=TAG20160408T163916 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 08-APR-16
channel ORA_DISK_1: finished piece 1 at 08-APR-16
piece handle=/oracle/flsh_area/ORCL/backupset/2016_04_08/o1_mf_ncsnf_TAG20160408T163916_cjgvlskq_.bkp tag=TAG20160408T163916 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 08-APR-16

4,关闭闪回恢复区, 将db_recovery_file_dest参数设置为空,可以停用闪回恢复区。并且没有在rman显现的配置备份路径,同时也没有在语句中指定路径,此时会选择 $ORACLE_HOME/dbs
SQL> show parameter recover

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string     
db_recovery_file_dest_size           big integer 3G
recovery_parallelism                 integer     0
RMAN>show all;
using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/oracle/app/oracle/product/11.2/db_1/dbs/snapcf_orcl.f'; # default

RMAN> backup tablespace system  ;

Starting backup at 08-APR-16
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=21 device type=DISK
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=/oradata/orcl/system01.dbf
channel ORA_DISK_1: starting piece 1 at 08-APR-16
channel ORA_DISK_1: finished piece 1 at 08-APR-16
piece handle= /oracle/app/oracle/product/11.2/db_1/dbs/34r2hfq8_1_1 tag=TAG20160408T160112 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:25
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 08-APR-16
channel ORA_DISK_1: finished piece 1 at 08-APR-16
piece handle= /oracle/app/oracle/product/11.2/db_1/dbs/35r2hfsu_1_1 tag=TAG20160408T160112 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 08-APR-16


综上所述:oracle数据库rman的备份路径,遵循的原则是
备份语句中指定的format  > rman 中显现的configure channel device type disk format '/oracle/orclarch/%U_%d'的路径 > 闪回恢复区>$ORACLE_HOME/dbs
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值