Assume the following retention policy specified strated in Figure rw01.
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 archivelogmode, and archived logs are saved on disk
As replicated strated in Figure rw01
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 rw02
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 within the window
You must save the January 14 backup as well as all archived redo logs from log sequence 500 to 1150
Thus, 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 (por)> = 7
All backups older than the most recent backup that satisfied this condition are obsolete.
The recovery window retention policy doesn't just keep the last n days of the Backup
It calculates the point-of-recovery (por) Value
Accounting the current date and the number of the days mentioned in the retention policy.
The por is more than just the backup of the last n days
In addition, you wocould also need the backup of all those which come under the calculation of por
For example, assume today is 20th of every L and you decide to go with the recovery window of 2 days
In the case of non-incremental backup, this is how it wocould look:
Current_date status por
20-mirror l available 20-2 = 18th mirror l
21-logical L available 21-2 = 19th logical L
22-mirror l available 22-2 = 20th mirror l
23-Snapshot l backup of 20th obsoleted 23-2 = 21st snapshot L
So in the case of 23rd, the backup wocould be marked as obsolete