RMAN Recovery Window and Redundancy Concept

网上搜了下关于Recovery Window的介绍,发现对这个问题的讨论也不少,但是貌似说得都不是很清楚。在文档《Oracle11g Backup and Recovery User's Guide》里面发现对Recovery Window的讲解,觉得还是很清楚的,摘抄在此,以作参考.....

Recovery Window

A recovery window is a period of time that begins with the current time and extends backward in time to the point of recoverability. The point of recoverability is the earliest time for a hypothetical point-in-time recovery, that is, the earliest point to which you can recover following a media failure. For example, if you implement a recovery window of one week, then RMAN retains full backups and required incremental backups and archived logs so that the database can be recovered up to 7 days in the past. You implement this retention policy as follows:

 CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;

This command ensures that for each datafile one backup that is older than the point of recoverability must be retained. For example, if the recovery window is 7, then there must always exist one backup of each datafile that satisfies the following condition:

SYSDATE - BACKUP CHECKPOINT TIME >= 7 

All backups older than the most recent backup that satisfied this condition are obsolete. 

  

Assume the following retention policy illustrated in Figure 7–4. The retention policy has the following aspects:

■ The recovery window is 7 days.

■ Database backups are scheduled every two weeks on these days:

–     January 1

–     January 15

–     January 29

–     February 12

■ The database runs in ARCHIVELOG mode, and archived logs are saved on disk only as long as needed for the retention policy. 

 

As illustrated in Figure 7–4, the current time is January 23 and the point of recoverability is January 16. Hence, the January 14 backup is needed for recovery, and so are the archived logs from log sequence 500 through 850. The logs before 500 and the January 1 backup are obsolete because they are not needed for recovery to a point within the window. 

Assume the same scenario a week later, as depicted in Figure 7–5.

 

In this scenario, the current time is January 30 and the point of recoverability is January 23. Note how the January 14 backup is not obsolete even though a more recent backup (January 28) exists in the recovery window. This situation occurs because restoring the January 28 backup does not enable you to recover to the earliest time in the window, January 23. To ensure recoverability to any point in the window, you must save the January 14 backup and all archived logs from sequence 500 to 1150. 

Backup Redundancy

In some cases using a recovery window can complicate disk space planning because the number of backups that must be retained is not constant and depends on the backup schedule. In contrast, a redundancy-based retention policy specifies how many backups of each datafile must be retained. For example, you can configure a redundancy of 2 as follows:

CONFIGURE RETENTION POLICY TO REDUNDANCY 2;

The default retention policy is configured to REDUNDANCY 1. 




--------------------------------------
Regards,
FangwenYu
原文地址:https://www.cnblogs.com/fangwenyu/p/1807626.html