当前位置:操作系统 > Unix/Linux >>

RMAN Recovery Window retention policy tips

RMAN Recovery Window retention policy tips

 Assume the following retention policy illustrated 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 illustrated 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 would also need the backup of all those which come under the calculation of POR
 For example, assume today is 20th of April and you decide to go with the Recovery Window of 2 days 
 
 In the case of non-incremental backup, this is how it would look:
 
 Current_Date  Status   POR  
 20-April   Available   20-2=18th April
 21-April   Available   21-2= 19th April
 22-April   Available   22-2=20th April
 23-April  Backup of 20th Obsoleted 23-2=21st April
 
 So in the case of 23rd, the backup would be marked as obsolete
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,