RMAN Retention Policy Based On Redundancy Policy

Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
  • User AvatarAshiwini
  • 27 Jun, 2024
  • 0 Comments
  • 1 Min Read

RMAN Retention Policy Based On Redundancy Policy

When you take backups regularly to a specified disk, over time the backup disk will eventually fill up, requiring the deletion of old backups to make space for new ones. Manually identifying and deleting old backups by following specific rules, such as deleting all backups taken before one month or keeping only the two most recent backup copies, can be cumbersome.

To simplify this process, Oracle RMAN provides a feature called RETENTION POLICY.

RMAN Retention Policy

The RETENTION POLICY in RMAN helps automate the management of old backups by defining rules for retaining and deleting backups. One way to configure this is through the REDUNDANCY parameter.

Redundancy-Based Retention Policy

The REDUNDANCY parameter of the CONFIGURE RETENTION POLICY command specifies how many backups of each datafile and control file RMAN should keep. If the number of backups for a specific datafile or control file exceeds the redundancy setting, RMAN considers the extra backups obsolete and eligible for deletion.

Example Configuration

Suppose we have an RMAN retention policy configured with REDUNDANCY 2. This means that RMAN will always retain at least two backups of each datafile, control file, or archived log. Any older backups beyond this number are marked as obsolete and can be safely removed.

Configuring Redundancy-Based Retention Policy

1 .Set the Retention Policy to Redundancy 2

RMAN> CONFIGURE RETENTION POLICY TO REDUNDANCY 2;

2 .View the Current Retention Policy:

RMAN> SHOW RETENTION POLICY;
3 .Identify Obsolete Backups:
RMAN> REPORT OBSOLETE;

4 .Delete Obsolete Backups:

RMAN> DELETE OBSOLETE;

By using this configuration, RMAN ensures that only the two most recent backups of each file are retained, and older backups are automatically identified as obsolete and can be deleted, simplifying backup management and ensuring efficient use of disk space.