CONFIGURE BACKUP OPTIMIZATION

------------------------------------什么是backup optimization?

oracle通过optimization来有选择backup datafile,archivelog,backup set,跳过那些已存在的满足条件的。

条件都哪些呢?

----datafile

The datafile must have the same DBID, checkpoint SCN, creation SCN, and RESETLOGS SCN and time as a datafile already in a backup. The datafile must be offline-normal, read-only, or closed normally.

--前提是数据文件必须处于offline-normal,read-only,closed normally才激活optimization,才会进一步验证。数据文件要具有一样的DBID,checkpoin SCN,creation SCN,resetlogs SCN,time as a datafile already in a backup(个人理解是已存在的备份的创建时间)

----archivelog

Same DBID, thread, sequence number, and RESETLOGS SCN and time.

--相同的DBID,线程,序列号和resetlogs SCN/time

----backupset

Same DBID, backup set record ID and stamp

-相同 DBID,backup set,记录ID和时间戳


----------------------------------------怎么启用optimization

----查看opitimization的状态

RMAN> SHOW BACKUP OPTIMIZATION;

----默认是off

----------启用

RMAN> CONFIGURE BACKUP OPTIMIZATION ON;

----------关闭

RMAN> CONFIGURE BACKUP OPTIMIZATION OFF;


RMAN在下列条件下才激活optimization

1.configure backup optimization on;

2.运行一下命令时参考bakcup database

                               backup archivelog with all or like options

                               backup recovery area

                               backup recovery files

                               backup datafilecopy

3.同时只能有一个通道被分配SBT/DISK,同一个bakcup命令中不能包含SBT和DISK.

------------------------------------retention policise,redundancy和optimization的优先级

例:read-only tablespace users retention policese 7 days,bakcuped 31-1;

optimization on

在28-2的时候,执行backup会再备份users,因为时间超过了retention的7天,这时retention的优先级大于optimization;

待续。。。以下8-27新增

关于optimization和redundancy的关系

1.10g以后redundancy参数设置的值即为保留的备份数,redundancy 2 即保留2份,不同于9i;

2.增量备份的时候,level0级开始到下一个level0之间的备份当作一份。

 比如redundancy为1. 周一备份的level0,周2level1,周3level1.在周三的时候执行delete obsolete并不会删除level0。

because this backup is not redundant: the Tuesday level 1 backup could be used to recover the Monday level 0 backup to a time between noon on Tuesday and noon on Wednesday.

因为周1到周3的3个备份才是一个完整的用来recovery的备份。

如果在周四的时候执行level0备份,然后delete obsolete才会删除周1的level0以及周2,周三的level1.


你可能感兴趣的:(rman,backup,optimization)