Loading...

Data Retention Rules for Oracle Backups

Retention Rules for Regular Full Backups

Oracle full backups follow the basic and extended retention rules. For more information, see Data Retention Rules.

If you have a backup cycle that includes full, incremental and log backups, the full backups and the associated log backups are pined, but the incremental backups are not pined. If you want to retain the incremental backups, you must manually select the backup job and retain it. For information, see Manage Retention of Individual Jobs.

Retention rules for Oracle Archive Redo Log Backups

Log Backups (archived redo) are not considered part of the backup cycle. Therefore, the storage policy cycle retention parameters do not apply to them. However, log backups can be linked to data backup operations, which can affect their retention as follows:

  • When a log backup runs at the same time as a full backup, they are linked even when the full backup included data only. These backups follow the standard data aging rules.
  • If a full backup job includes the data and the logs, then the next log backup is not linked to this full backup job. These are unlinked log backups and by default and follow these log backup data aging rules:
    • The log backups that are not copied to secondary copies are not aged on both the primary and non-primary source copy.
    • Log backups that exist on only one copy are aged when they are older than the oldest basic retention data.
    • Log backups that exist on multiple copies are retained on the copy with longest retention days and are aged after the oldest basic retention data. The log backup jobs on the remaining copies are aged by using the copy retention days There is no check to see if the oldest basic retention data exists.
    • Partial, disabled logs are aged when they are older than the oldest basic retention data.
  • If a full backup job includes just the data then the next log backup job is linked to this full backup job. These are considered as linked or chained log backups and are not aged until the linked data is aged. In addition, these log backups follow the unique data aging rules for log backups.

Retention Rules for Selective Online Full and Incremental Backups

A selective online full or incremental operation includes archive logs and Oracle data. Any log job you start within the time frame of the operation is linked to the selective online full or incremental job. The software treats the logs and the selective online full or incremental job as one entity. They are copied to synchronous and selective copies together during the auxiliary copy operations and are aged together. If any part of the selective online full is missing from a copy, the full backup is not considered as a valid full and in not counted as a cycle during data aging. Consider the following:

  • Selective online full backups and all logs linked with it must be retained together on the same storage policy copy.
  • The logs that are linked with a selective online full (and the logs of the selective online full) can be aged only if they are older than the oldest data that can be aged and the corresponding data of the selective online full that can be or have been aged.
  • Selective online full backup jobs that are completed with errors are not retained by extended retention rules during the data aging operation.

You can configure the software to allow selective online incremental backups to be eligible for selective copy. For more information, see Allowing Incremental Jobs to Be Eligible for Selective Copy.

You can run a script after you run a selective online full or incremental backup to enable the full cycle retention of selective jobs on the selective copy.  For more information, see Enabling Extended Retention of a Full Cycle Job on the Selective Copy.

You can copy a full cycle of jobs to a selective copy. The cycle includes the selective online full and incremental jobs. For additional information, see Copying a Full Cycle of Jobs to a Selective Copy.

Retention Rules for Offline Full and Incremental Backups

You can configure the software to allow offline backups to be eligible for selective copy. For more information, see Allowing Incremental Jobs to Be Eligible for Selective Copy.

You can run a script after you run a selective online full or incremental backup to enable the full cycle retention of selective jobs on the selective copy.  For more information, see Enabling Extended Retention of a Full Cycle Job on the Selective Copy.

You can copy a full cycle of jobs to a selective copy. The cycle includes the offline full and incremental jobs. For additional information, see Copying a Full Cycle of Jobs to a Selective Copy.

Retention Rules for Manual Retention Jobs

The following rules apply to a backup cycle that contains full, log and incremental backups.

Full backups and the associated log backups are aged together, but the incremental backups are not.

If you manually change the retention for a full backup, the associated log backups are automatically includes and retained. If you want to keep an incremental job in a cycle that you manually changed, you must manually select each incremental backup job that you want to keep and retain it. For information, see see Manage Retention of Individual Jobs.

Retention Rules for Oracle Regular Full Backups on Selective Copies

When you install SnapProtect Version 11, all consistent and self-contained full backups are automatically eligible for selective copy and extended retention rules. You can change this option by modifying the Honor Extended Retention Rules for Oracle/RAC/SAP regular Full Jobs Media Management parameter.

When you upgrade to SnapProtect Version 11, you must set the  Honor Extended Retention Rules for Oracle/RAC/SAP regular Full Jobs Media Management parameter to 1 to have all consistent and self-contained full backups to be automatically eligible for selective copy and extended retention rules.

For information on configuring the Media Management parameter, see Media Management Configuration.

Retention Rules for Command Line Backups

  • The third party command line log backups can be linked to third party command line data backups as well as any other kind of backup data as per regular data link rule.
  • Data from third-party command line backups ages differently than data from backups initiated through the CommCell Console. Retention cycles are not used for copies involved in operations from the third-party command line. For such operations, data is aged according to the associated retention time. You can manually set the retention time for each third party command line job from the storage policy copy. The command line log backups are aged according to the retention time set for its associated command line data backup job.
  • Command line full jobs are aged only when all of the incremental data backups in that cycle are eligible for pruning.
  • Command line backup are not eligible for extended retention.

Partial Backup Pruning Warning

Be aware of the following for command line jobs.

If the last full backup includes a partial database, then data in a previous full backup might be lost.

Example

A backup is performed every day, providing 5 backups spread over 5 days.

Backup 1: This is a full backup of the entire database.

Backup 2: This is a full backup of the partial database.

Backup 3: This is an incremental data backup.

Backup 4: This is an incremental data backup.

Backup 5: This is a log only backup.

If the storage policy retention is 3 days, this makes Backup 1 and Backup 2 eligible for pruning. Backup 2 is retained because incremental jobs Backup 3 and Backup 4 are not eligible for pruning. Backup 1, which contains the entire database, is pruned and thus the entire database backup is lost.

Retention Rules for On-Demand and Customized RMAN Backups

Data Aging for Oracle On-Demand and customized RMAN Script backup jobs uses days and time, and ignores the cycles for pruning the data. Therefore, once the retention time criteria has been met, all data (for both data and logs) is pruned that was backed up using the storage policy specified in the RMAN script that was run through the Command Line Interface.

When you perform an On-Demand full backup job (that includes data and logs), the next log backup job will get linked to this job, since the job type for Full backup is data for both the data and log phase.

An effective storage policy strategy for Oracle On-Demand and customized RMAN Script backups is as follows:

  • The same storage policy must not be used for regular Oracle backups and Oracle On-Demand and customized RMAN Script backup.
  • The storage policy copy containing logs of Oracle On-Demand and customized RMAN Script backups must have a longer retention time than other storage policies used by regular Oracle backups for the same instance. This prevents the logs of Oracle On-Demand backups from being pruned before the data of regular Oracle backups and allows the database to be fully restored and recovered using the data of old regular Oracle backups and logs.

Oracle selective online full and offline full jobs performed by using the On-Demand configuration and customized script will not be copied to selective copy and are not eligible for extended retention.

Data Aging Rules for Jobs Completed with Errors

Cycle retention is not honored on jobs that complete with errors. The job gets pruned after the configured storage policy retention (the Basic Retention Rule for All Backups on the Retention tab of the Storage Policy Properties dialog) expires.

  1. From the CommCell Console ribbon, click the Home tab, and then click Control Panel.
  2. Under the Storage section, click the Media Management icon.
  3. On the Data Aging tab of the Media Management Configuration dialog box, change the value for the Ignore Completed With Errors job option for Extended Retention calculations option from 1 to 0.
  4. Click OK to close the Media Management Configuration dialog box.

SnapProtect Command Line Interface Data Aging

  • The qoperation agedata command can age data and logs simultaneously based on the Job ID, and it is especially useful for aging each of these items separately.

Related Topics

Data Aging for Oracle

Data Aging from the CommCell Console

Data Aging from the RMAN Command Line

Data Aging