文档地址:http://docs.oracle.com/cd/B19306_01/backup.102/b14191/rcmbackp.htm#i1006854
Using Backup Optimization: Examples
Run the CONFIGURE
BACKUP
OPTIMIZATION
command to enable backup optimization.When specific conditions are met (described in "Backup Optimization Algorithm"), RMANskips backups of files that are identical to files that are alreadybacked up.
--这个优化选项。在RMAN备份当中,如果在一个文件满足条件(见下conditions),RMAN在备份相同文件,即此文件备份在备份当中存在,同时此备份不是过期的。RMAN会跳过此备份,进行下边的备份工作,从而会节省时间。
Assume that you configure optimization and a retentionpolicy as follows:
CONFIGURE DEFAULT DEVICE TYPE TO sbt; CONFIGURE BACKUP OPTIMIZATION ON; CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 4 DAYS;
Optimizing a Database Backup: Example
Then, you run this command every night to back up the databaseto tape:
BACKUP DATABASE;
Because backup optimization is configured, RMAN skipsbackups of offline and read-only datafiles only if the most recentbackups were made on or after the earliest point in the recoverywindow. RMAN does not skip backups when the most recent backups areolder than thewindow.---这段话译文。即RMAN最近的一次备份不能晚于这个恢复窗口的时间,如果晚了,说直白点,即备份被marked为obsolete了,那么备份的时候不会跳过此文件的备份,尽管你的文件符合要求。怀疑:下边的文档,不是这么写。估计文档出错了。
?/oradata/trgt/history01.dbf
every night, solong as one backup set containing this file exists within therecovery window.
For example, if the most recent backup of the datafileswas on Sunday, and the point of recoverability (that is, theearliest date in the recovery window) is on Saturday, then RMANskips the datafiles when you run the Wednesday backup. On Friday,the point of recoverability is now Monday,
--因为这里默认设定了恢复窗口的时间为4天。然而到了星期五,最早的的恢复点应该在星期一,星期天的备份就在这个恢复窗口时间的外边,即备份文件过期了。RMAN在备份这个文件的时候就不会逃过此文件了。
so the Sunday backup is now outside the window. Hence,the Friday backup does not skip the datafiles.
--这里举了个例子。
文档地址:http://docs.oracle.com/cd/B19306_01/backup.102/b14191/rcmconc1.htm#BRADV113
Backup Optimization
Ifyou enable backup optimization, then the BACKUP
command skips backing up files when the identical file has alreadybeen backed up to the specified device type.
译文:如果启用了备份优化,那么备份命令在备份相同文件的时候,而此时它的备份已经被备份到指定的设备类型上了,那么备份会跳过这个文件。
Rules for Identifying Identical Files for BackupOptimization
--备份优化中的标识相同文件的原则
Table 2-2 describes criteria that RMAN uses to determinewhether a file is identical to a file that it already backedup.
Table 2-2 Criteria to Determine an IdenticalFile---确定相同文件的条件
Type of File | Criteria to Determine an IdenticalFile |
---|---|
Datafile | The datafile must have the same DBID, checkpoint SCN,creation SCN, and |
Archived redo log | Same thread, sequence number, and |
Backup set | Same backup set recid and stamp. |
If RMAN determines that a file is identical and it has alreadybeen backed up, then it is a candidate to be skipped. However, RMANmust do further checking to determine whether to skip the file,because both the retention policy and the backup duplexing featureare factors in the algorithm that determines whether RMAN hassufficient backups on the specified device type.
Backup Optimization Algorithm---备份优化算法
Table 2-3 describes the algorithm that backup optimization useswhen determining whether to skip the backup of an identicalfile.
Table 2-3 Backup Optimization Algorithm
For an Identical ... | Backup Optimization Algorithm |
---|---|
Datafile | With a recovery window-based retention policy: For backups to tape, RMAN takes another backup of a file, evenif a backup of an identical file exists, if the most recent backupis older than the configured recovery window. This is done to allowmedia to be recycled after the media expires. For backups to disk, RMAN skips taking the backup if anidentical file is available from a backup on disk, even if thatbackup is older than the beginning of the recovery window. Theretention policy causes RMAN to retain the old backup for as longas it is needed. --这句话当中有错误的地方。even if that backup is older than thebeginning of the recovery window.尽管那个备份要陈旧于恢复窗口的开始时间。 如果是这种情况的话,RMAN备份的时候是不会跳过这个文件的。怀疑文档出错了。 With a redundancy-based retention policy: RMAN sets r
RMAN skips backup only if at least n backups of anidentical file exist on the specified device. If RMAN does not skipthe backup, then it makes the backup exactly as specified. |
Archived log | By default, n
RMAN skips backup only if at least n backups of anidentical file exist on the specified device. If RMAN does not skipthe backup, then it makes the backup exactly as specified. |
Backup set | By default, n
RMAN skips backup only if at least n backups of anidentical file exist on the specified device. If RMAN does not skipthe backup, then it makes the backup exactly as specified. |
文档地址:http://docs.oracle.com/cd/B19306_01/backup.102/b14194/rcmsynta015.htm#RCMRF113
CONFIGURE RETENTION POLICY TO NONE; 意思为:Disables theretention policy feature. RMAN does not consider any backups orcopies as obsolete.
所以当需要优化的时候,将保留策略更改为CONFIGURE RETENTION POLICY TONONE;,同时那个备份文件没被人为手动删除的话,可以使得满足条件的文件不需要再次备份,RMAN会跳过此文件进行下边的工作,从而节省备份的时间,提高系统的performance;