Storing Backups in OCI Immutable Buckets

Learn how to configure the Oracle Database Cloud Backup Module to store backups in OCI immutable buckets.

In Oracle Cloud Infrastructure (OCI) Object Storage, an immutable bucket is a storage location governed by time-bound retention rules that protect data from modification or deletion for a specified duration. Use immutable buckets to implement a flexible backup retention strategy for each target database, and to prevent any modification to backups.

The Oracle Database Cloud Backup Module supports storing backups in immutable buckets that you have created in OCI.

To store backups in immutable buckets, you must first create these buckets in OCI Object storage:

  • Regulatory Compliance Bucket configured with retention rules and rule lock (if necessary)

    You can also reuse an existing bucket associated with retention rules.

  • Temporary Metadata Bucket with no retention rules or retention settings

    During backup operations, the temporary bucket is used to store backup metadata and files temporarily.

Note:

If you have stored your database backups in an existing regular bucket, then you can configure the same bucket to store immutable backups. In this case, first specify the existing bucket and a temporary bucket in the opcSID.ora configuration file (or run the backup module installer again), and then apply retention rules to the bucket in OCI. This ensures that your existing backups are also protected for the duration defined in the retention rule.

Note:

Your databases may have varied demands for backup retention. As a best practice, Oracle recommends that you maintain a separate immutable bucket and a corresponding unique temporary metadata bucket for each target database.

For example, if you create an immutable bucket named sales_db, then create a temporary metadata bucket named sales_db_temp.

If you plan to reuse an existing OCI bucket that is currently used by more than one target database, ensure that you reconfigure the bucket per the best practice recommended by Oracle.

For more information about creating buckets and retention rules, see OCI Object Storage documentation.

To Store Immutable Backups with Oracle Database Cloud Backup Module for OCI

  1. Download and install the Oracle Database Cloud Backup Module on your database server.
    When you run the backup module, use either of these options:
    • Specify the -bucket parameter and the name of an existing bucket or a new immutable bucket that you have created in OCI
    • Skip the -bucket parameter if you want to use the default bucket created by the installer
    If you have not installed the latest SBT library, run the backup module installer again using the -lib-download-only option.
    java -jar oci_install.jar -libdir '/home/oracle/OPC/lib' -lib-download-only
  2. After you install the backup module, add the OPC_CONTAINER parameter, the OPC_TEMP_CONTAINER parameter, and the bucket names in opcSID.ora.
    This example specifies the immutable bucket sales_db and the temporary metadata bucket sales_db_temp in the opcSID.ora file:
    OPC_CONTAINER=sales_db
    OPC_TEMP_CONTAINER=sales_db_temp
  3. In the OCI Console, review the retention rule applied on the immutable bucket to ensure that you have specified the exact duration for which you want to prevent any modification to backups. Lock the rule, if necessary.

Note:

Ensure that the duration you specify in a retention rule is shorter than the RMAN recovery window period. RMAN issues an error while trying to delete an expired backup that exists in the retention period.
If you use the Oracle Database Backup Cloud Service Module for OCI Classic, use a similar procedure to install the backup module, and then add the OPC_CONTAINER parameter, the OPC_TEMP_CONTAINER parameter, and the container names in opcSID.ora.