RMAN configuration retention policy

Source: Internet
Author: User
RMAN retention policies are related to data integrity. Therefore, they are important and set based on user-defined data recovery tolerance. That is to say, based on the recovery needs

RMAN retention policies are related to data integrity. Therefore, they are important and set based on user-defined data recovery tolerance. That is to say, based on the recovery needs

RMAN retention policies are related to data integrity. Therefore, they are important and set based on user-defined data recovery tolerance. That is to say, based on the recovery needs, the user needs to retain data for several days, or the user needs to back up several copies, or does not need to set a retention policy. In the production environment, most of the retention policies based on the recovery window are used. Therefore, we need to pay attention to and understand their usage. This article mainly describes the three retention policy methods in RMAN.

1. What is a backup retention policy?
That is to say, we can use configure retention policy to configure how long the backup can be retained and how long it will be retained.
Note that the retention policy is relative to the restoration, that is, the reservation policy is formulated based on the recovery needs, for example, to restore to 3 days ago, or to retain two different copies
Oracle supports three retention policies: one is a restore window-based retention policy and the other is a redundant retention policy. One is a non-retained policy. The three retained policies are mutually exclusive and cannot be used at the same time.
When the backup retention policy is enabled, after the generated backup meets the retention policy, it will be marked as obsolete. That is to say, RMAN considers that the backup is no longer needed for restoration.
You can use report obsolete to view outdated backups of the current database. And use delete obsolete To delete outdated backups.
For outdated backups (Backup sets, image copies, etc.), RMAN only marks them without using FRA, instead of deleting these outdated backups.
When FRA is used, RMAN automatically deletes these outdated backups to reuse FRA space cyclically.
Pay attention to understanding invalid or outdated backups. After the former executes crosscheck, the file is not found (Deleted), and the latter indicates that the file exists, but it is no longer needed for recovery based on the retention policy.
Use range of retention policy
Full backup, level 0, control file backup
For data file image copies (copy mode), if RMAN deems that this copy is no longer needed, it can be deleted
When all data files in the backup set are historical, they can be deleted.

2. Restore window-based retention policy
This method is used to ensure that the database is restored to a specific time point. For example, to restore data within one week, use the recovery window of 7 DAYS.
All the full backup, Incremental backup, and archive logs that have been restored to the last 7 days should be retained, and the backup may be retained 7 days ago.
For example, the complete backup in the system is 8 days ago. Even if a new full backup is generated, the last full backup should be retained, instead of saying that after 7 days, these backups will no longer be needed.
Configure the restore window retention policy:
Configure retention policy to recovery window of 7 DAYS;
For the preceding configuration, each data file and BACKUP must meet this condition: SYSDATE-backup checkpoint time> = 7, and the previous BACKUP is invalid.
The following Recovery window analysis example is from the Backup and Recovery User's Guide.
Recovery window analysis example 1:

The recovery window is 7 days, and the database is in archive mode.
The backup plan is to perform full backup every two weeks, including January 1, January 15, January 29, and February 12.
For the scenario in the figure, the current time is Jan 23, then the 7-day recovery window is Jan 16, to ensure that the data can be restored to Jan 16,
Therefore, backup of Jan 14 and archive log 500 to log 850 should be retained, while backup of Jan 1 is outdated.

Recovery window analysis Example 2:

If the current time is Jan 30, the 7-day recovery window is Jan 23. To ensure that Jan 23 is recoverable, the last full backup should be available to the archive log of Jan 23.
That is, the full backup of Jan 14 must be retained, and all the backups from log 500 to log 1150 must be retained.

For more details, please continue to read the highlights on the next page:

Recommended reading:

RMAN: Configure an archive log deletion policy

Basic Oracle tutorial-copying a database through RMAN

Reference for RMAN backup policy formulation

RMAN backup learning notes

Oracle Database Backup encryption RMAN Encryption

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.