Retention policies for Rman backups (retention policy)

Source: Internet
Author: User

What are backup retention policies (retention policy)

A retention policy refers to whether a backup is to be retained and how long it is retained. You can use the Configure retention policy command to create a consistent, automated backup retention policy. When a backup policy is in effect, Rman considers the backup of the data files and control files to be obsolete, meaning that these backups are no longer needed for recovery based on user configuration. Users can use the report obsolete command to find obsolete files and delete them using delete obsolete.

As the number of backups increases, the old backup files become obsolete. Rman can identify obsolete files, but they are not automatically deleted. Requires the user to manually execute delete obsolete to delete it.

If the database is configured with a fast flash back zone, the database automatically deletes files in the flashback zone based on the fast Flash zone disk quota rule. The quota rule in the Flashback zone is different from the Rman backup policy rule, but the Flashback zone does not delete backup files that do not exceed the backup policy.

Obsolete and expired are two different concepts.

Whether the backup is obsolete, is determined by the backup strategy, refers to a file that exceeds the limits of the backup policy and is no longer needed at the time of recovery, expired refers to Rman not finding these files when performing crosscheck checks. In a word, obsolete means "no longer needed" and expired means "not found".

  

Retention policies are full backups or level 0 backups for data files and control files (either datafile image copy, a proxy copy, or part of a backup set). For datafile copies and proxy copies, if Rman thinks it is no longer needed, it can be deleted. For datafile backups in a backup set, only the entire backup set becomes obsolete before it can be deleted.

Backup policies affect both archive logs and Level 1 incremental backups, in addition to full and level 0 backups of data files and control files. First, Rman detects those data files, control file backup is obsolete, then Rman will be those who no longer need to restore the archive log, Level 1 incremental backup thought to be obsolete.

How the report obsolete and delete obsolete commands work:
is divided into two main steps

(1) First, for an incremental backup of full backup, datafile copy, and level 0, Rman will identify which obsolete is based on retention policy.

(2) Then, for an incremental backup of the archive log and Level 1, if its corresponding full backup, datafile copy, and level 0 incremental backups are already obsolete, they will also be considered obsolete. Because they are no longer needed for data recovery.

Note:a ' Delete obsolete ' does not check for that the Archivelog files has been backed up before it deletes them.

keep the type of backup policy: (There are two types of backup)

(1) Redundancy (redundant): default is redundant

Rman> Configure retention policy to redundancy x;

(2) Recovery window (restore Windows)

Rman> Configure retention Policy to recovery windows of X days;

When configuring the Recovery window period, the time should not be greater than the value of the parameter control_file_record_keep_time.

Cancel Backup Policy : (never set backup to obsolete)

Rman> Configure retention policy to none;

How to make a backup non-affected by the backup policy:
The user may have a requirement for long-term retention of data backups (exceeding Rmand retention policy settings). These backup information should be recorded in the Rman repository, but should exceed the limits of the Rman backup retention policy, otherwise it will be identified as obsolete.
You can use the Keep keyword during backup, or use Change...keep after a backup.
For archived logs, you can use the Logs keyword so that it is not identified as obsolete after the retention policy is exceeded
Example:

# Creates a backup and exempts it from retention policy until last day of the rman> backup database keep until time "t O_date (' 31-dec-2007 ', ' dd-mon-yyyy ') "nologs; # Specifies that Backupset 2 was no longer exempt from the retention policy rman> change backupset 2 nokeep; # Creates a backup that's indefinitely exempt from the retention policy rman> backup tablespace users Keep Forever Nol OGs

Retention policies for Rman backups (retention policy)

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.