Oracle Exadata Cloud Service Long Term Database Backup Retention and Replicate Backups Across Regions

Oracle Cloud Infrastructure Solution to Retain Backups Forever and Cross-Region Archival of Oracle Database Backups in Customer Managed Bucket.

Shadab Mohammad
Oracle Developers
7 min readJun 18, 2022

--

Introduction

Many of our customers require their Oracle database backups to be stored on Oracle Cloud Infrastructure (OCI) cross-region and for long-term retention due to various compliance requirements for the industry they operate in. The most frequent question I get from our Enterprise customers is: How can I archive my backups on OCI for seven years or ten years to meet our regulators requirement? In this article we will explore how you can do that on OCI Exadata Cloud Service

Currently the automated backups provided by default on Exadata Cloud Service (ExaCS) is limited to a maximum of 60 days and cross region backups are not supported. Both the Automatic backup and Manual backup are stored in an Oracle Managed Bucket which you do not have direct access to. So how do we do archival backups in your own bucket and then replicate those backups cross-region.

In this article we’ll show you how you can take an on-demand database backups from ExaCS to a customer managed bucket on Oracle Object Storage and replicate the backup data cross-region.

Solution

The Exadata Cloud Service provides capability to take archived backups which have retention of ‘keep-forever’ unlike the Auto backups which can be retained only for 60-days maximum. You can create these on-demand backups using either the OCI console or the dbaascli utility. We will use the dbaascli to create long term backups and then use the MV2BUCKET utility to upload them to a customer managed bucket and then replicate the bucket to another region.

The solution is implemented the below components

  1. MV2BUCKET utility which can be used to copy backups from Oracle managed bucket to your own bucket
  2. OCI-CLI command line utility to authenticate MV2BUCKET on the ExaCS VM node
  3. File Storage Service to stage the backups on the local ExaCS node
  4. Oracle Object Storage for backups to be stored in
  5. Finally a cross-region replication of the Object storage bucket in primary region to the destination region for storage of backups
  6. dbaascli utility for backing up the database on ExaCS
Exadata Database Service Long-Term Backup Retention and Cross Region Replication Architecture

Pre-Requisties

  1. You have a OCI user and required IAM permissions to perform all operations in the tenancy
  2. You have opc user SSH access to the ExaCS VM CLUSTER nodes

3. A database exists on the ExaCS VM Cluster. In this example we will use a database called ‘TestDB

Steps for Setting Up MV2Bucket, OCI-CLI and Cross-Region Replication for Oracle Object Storage

  1. Install and Configure MV2BUCKET on the ExaCS Nodes

Download and Install latest version of MV2BUCKET rpm file with root user on the Exadata Cloud Service Node from Oracle Support [1]: (OCI) mv2bucket — Oracle Managed Bucket Content Manager (Doc ID 2723911.1)

2. Create a OCI File storage system and mount it on the ExaCS DB node for Staging the Backup’s [2]

3. Create a bucket in Primary Region and create a bucket in the Target region. Once both buckets are created, create a replication policy on the primary region bucket to replicate data to target region bucket [3]

Primary Region Bucket
Destination Region Bucket

4. Create an IAM policy for OSS Replication in your Compartment where ExaCS sits

5. Create replication policy on your Primary region bucket to Destination region

6. Install oci-cli as root user on the Exadata Cloud Service node

Configure API keys with your user and add your private key and config file in /root/.oci directory. You will need to create the .oci directory manually after installing oci-cli

Test if oci cli client is properly installed

Steps for Taking Backup with DBAASCLI and Copying to Customer Managed Bucket with MV2BUCKET

  1. Login to any one of the ExaCS DB Node and create a customize backup with retention of ‘keep-forever’

OR — Alternately you can create a long-term retention backup from OCI Console

2. Check the backup status using dbaascli commands

3. Run mv2bucket.bin with ‘root’ user and copy the backups from the database to staging area and then upload to the primary region bucket

Once the data comes in primary bucket, it is replicated to the Target region bucket automatically. Check the bucket in the destination region

4. Run another Sync to Local Storage

5. Get OPC and Wallet file info

We have thus successfully long term archive backups for ExaCS and copied it over to a customer managed bucket and replicated the backup data across region.

Ready to learn more? Please visit oracle.com/database for more information.

You can also visit our public Slack to discuss!

--

--

Shadab Mohammad
Oracle Developers

Cloud Solutions Architect@Oracle (The statements and opinions expressed here are my own & do not necessarily represent those of my employer)