RMAN Retention policy-(Recovery window)
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.
The recovery window thing always hurts my head. The recovery window time (7
days) is the number of days that RMAN should be able to recover the
database. So.... it's like this:
Day 1 Full Can recover to day 1
Day 2 Inc Can recover to day 1,2
Day 3 Inc Can recover to day 1,2,3
Day 4 Inc Can recover to day 1,2,3,4
Day 5 Inc Can recover to day 1,2,3,4,5
Day 6 Inc Can recover to day 1,2,3,4,5,6
Day 7 Inc Can recover to day 1,2,3,4,5,6,7
Day 8 Full Can recover to day 1,2,3,4,5,6,7,8
Must be able to recover to day 2 (so full is needed)
Day 9 Inc Can recover to day 1,2,3,4,5,6,7,8,9
Must be able to recover to day 3 (need full day 1 still)
Day 10 Inc Can recover to day 1,2,3....10
Must recover to day 4 (need full day 1 still)
Day 11 Inc Can recover to day 1,2,3.....11
Must recover to day 5 (need full day 1 still)
Day 12 Inc Can recover to day 1,2,3....12
Must recover to day 6 (need full day 1 still)
Day 13 Inc Can recover to day 1,2,3....13
Must recover to day 7 (need full day 1 still)
Day 14 Inc Can recover to day 8....14
Must recover to day 8 (No need for day 1 full, it's removed
as are incrementals.)
"Besides affecting datafile and control file backups, the retention policy affects archived logs and archived log backups. First, RMAN decides which datafile and control file backups are obsolete. Then, RMAN considers as obsolete all archived
log backups that are older than the oldest datafile or control file backup that must be retained."
You can see the obsolete archived files which is the older then the oldest file which has been obsolete.It also does'nt make sense to keep the archived log files which is older then the oldest file cause it will no longer be useful for recovery process.
No comments:
Post a Comment