当前位置:网站首页>Configuring the environment for RMAN backups_ Configure backup retention policy
Configuring the environment for RMAN backups_ Configure backup retention policy
2022-06-09 08:42:00 【Count words and lines】
Backup retention policies specify which backups must be retained to meet data recovery requirements .
Policies can be based on recovery windows or redundancy . Use CONFIGURE RETENTION POLICY Command to specify the retention policy .
1. Configure redundancy based retention policies
command CONFIGURE RETENTION POLICY Parameters of REDUNDANCY Appoint RMAN How many copies of each data file and control file are saved Full or level 0 Backup of . The default retention policy is REDUNDANCY 1.
If a particular data file or control file is full or level 0 The number of backups of exceeds the set REDUNDANCY value , that RMAN Treat additional backups as obsolete . When more backups are produced ,RMAN Keep track of which is reserved , Which is out of date .RMAN Retain all required archive logs and incremental backups to restore up-to-date backups .
Suppose on Monday , Tuesday , Wednesday and Thursday for data files 7 All have been fully backed up . We have it now 4 Data files 7 Full backup of . If REDUNDANCY yes 2, So Monday and Tuesday backups are obsolete . If you make another backup on Friday , So the data file 7 Backups made on Wednesdays have become obsolete .
Suppose in another case ,REDUNDANCY yes 1. Run levels at noon on Monday 0 Database backup of , Run levels at noon on Tuesday and Wednesday 1 Incremental backup of , Run levels at noon on Thursday 0 Backup of . Run the command immediately after the daily backup DELETE OBSOLETE. On Wednesday DELETE The command does not remove Tuesday's level 1, Because this backup is not redundant : Tuesday's level 1 The backup of can be used to restore the level of Monday 0 Between Tuesday noon and Wednesday noon . However , Run on Thursday DELETE The command removes the previous level 0 And level 1 Backup of .
stay RMAN Prompt to run CONFIGURE RETENTION POLICY command , As shown below :
CONFIGURE RETENTION POLICY TO REDUNDANCY 3;
2. Configure the retention policy based on the recovery window
command CONFIGURE Parameters of RECOVERY WINDOW Specify the number of days between the current time and the oldest recovery point .
RMAN No full backups or levels during the recovery window will be 0 Incremental backups of are considered expired . Besides ,RMAN Keep all required archive logs and levels 1 Incremental backup to restore a random point in the window period . stay RMAN Prompt CONFIGURE RETENTION POLICY Command to configure the retention policy based on the recovery window .
The following example ensures that the database can be restored to any point in the previous week :
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
RMAN Backups that are defined as expired by the recovery window will not be automatically deleted , But in REPORT OBSOLETE Output They are shown as OBSOLETE And in View V$BACKUP_FILES Show them in the OBSOLETE In the column . If you run DELETE OBSOLETE command ,RMAN Delete expired files .
3. Disable retention policy
When the retention policy is disabled ,RMAN No backups will be considered expired .
Run the following command to disable the retention policy :
CONFIGURE RETENTION POLICY TO NONE;
Configure the retention policy as NONE Different from clear configuration . Clear will revert to the default settings REDUNDANCY 1, and NONE Yes disable it .
If the retention policy is disabled , function REPORT OBSOLETE or DELETE OBSOLETE Command without transferring retention policy options to the command , that RMAN Report errors , Because there is no retention policy that can be used to determine which backups are expired .
Be careful : If you are using a quick recovery zone , Then do not disable the retention policy to run the database . If a file is never considered expired , Then files can only be deleted from the fast recovery area after being backed up to other disk locations or third-party storage devices such as tapes . This behavior may run out of space in the recovery area , Prevent the normal operation of the database .
source :《Oracle Database Backup and Recovery User’s Guide,19c》
边栏推荐
猜你喜欢

常用windwos api

Openinfra summit 2022 𞓜 Android cloud users stand out and are shortlisted for the super user Award

js类的创建和constructor的构造函数的使用

RMAN备份概念_关于备份保留策略(RETENTION POLICY)

SSM implements selected deletion

Self made compiler learning 3: introduction to flex and bison

OpenInfra Summit 2022 | 安超云用户脱颖而出 入围超级用户大奖

Secondary development of Nacos

如何解决mouseup事件失效的问题

10种提问型爆文标题句式 直接套用
随机推荐
Business judgment logic code if statement
【无标题】
Lambda表达式
About Matrix Decompositions
Self made compiler learning 4: using flex
About Eigendecomposition
Openinfra summit 2022 𞓜 China cloud data users once again won the super user Award
SSM实现选中删除
RMAN备份概念_目录
Virtual machine installation and configuration
SQL: market analysis I
Openinfra summit 2022 𞓜 Android cloud users stand out and are shortlisted for the super user Award
About Eigendecomposition
配置RMAN备份的环境_配置归档redo日志删除策略(DELETION POLICY)
【TeXstudio】【1】分式dfrac,tfrac Undefined control squence错误
10种提问型爆文标题句式 直接套用
Alibaba cloud IOT
数据仓库系列 之Clickhouse中的更新和删除操作
Introduction to framework: the update expression is invalid. At least one column must be updated
Huawei machine test, hj6 prime factor