Before You Begin

Purpose

In this tutorial, you’ll use an on Premise Oracle 12c database and Oracle Cloud storage service to backup the Oracle database to Oracle Cloud as an offsite backup and test the restore. This document covers a restore scenario i.e. Restore the on-Premise database backup from cloud storage and restore to cloud compute instance so that incase of any disaster, you can have the instance up and running in the cloud.

Time to Complete

Backup and restore times depend on the size of the database and the network transfer speed.

Based on the observation from one of the customer database which is a 10GB size 12c version database, took 10 mins for the backup and restore for each.

Background

When you are following the procedures described in this tutorial, you need to have an up and running Oracle database instance and also have an already provisioned Oracle Cloud service whether it is an subscription/trail version:

  • In this tutorial, provisioning the Oracle Compute Cloud or the Oracle storage cloud services was already completed. This document doesn’t cover the steps to provision the Oracle Cloud services.
  • The on Premise database is running on the RedHat Linux OS and running a 12c database version
  • Oracle Compute Cloud instance is provisioned using the RedHat Linux OS image
  • The database file locations on the on-Premise database and cloud compute are identical.

What Do You Need?

To perform the steps in this tutorial, you need:

  • An understanding of the Oracle RMAN backup and Recovery concepts.
  • A subscription to Oracle Compute Cloud Service. (See Getting Started with Oracle Compute Cloud Service.)
  • An understanding of Oracle RMAN backup encryption as it is a mandatory to encrypt the oracle cloud backups
  • Cloud service resources that match or exceed the on Premise database compute and storage requirements
  • Cloud services login credentials and also Cloud Storage Rest URL.
  • Oracle Cloud compute instance’s ssh keys and credentials
  • On-Premise database server OS login credentials
  • On-Premise database server directory structure is same as Cloud compute instance.

Process Overview

To configure the Oracle database backup to Oracle cloud, you need to perform the below steps:

  1. Obtain the access credentials to On-Premise Oracle database and Oracle Cloud services.
  2. Install the Oracle Cloud backup module on the On-Premise database which allows the Oracle Cloud backups
  3. Configure the Transparent Data enryption (TDE) for RMAN backups to cloud
  4. Configure the RMAN backup scripts to backup to cloud storage
  5. Validate the backups
  6. Prepare the cloud compute instance with Oracle database software installed or cloned from on-Premise
  7. Perform the database restore on Cloud compute instance with same directory structure for database files etc and validate

Download Oracle Cloud Backup utility

For backing up to cloud, we need to download and install the Oracle

Install Oracle Cloud Backup Module

For running this installation, we need the oracle cloud credentials and storage URL

Create the Cloud container

Create the storage container where the backups would be stored for the database. In this example, we are creating STMNEW-Backups container

Configure RMAN to use the Cloud Storage

Since Oracle Cloud uses a libopc.so library, we need to configure the SBT_TAPE channel to use this library in all RMAN backups.

Important Note: Oracle Cloud backup needs the encryption which is mandatory for storing the backups. So in our example, we are using the dual-mode encryption for the proof of concept.

Recovery Manager (RMAN) encrypted backups are securely created, transmitted, and stored in the cloud. Use one of the following RMAN encryption modes to encrypt backups:
• Password encryption
• Transparent Data Encryption (TDE)
• Dual-mode encryption (combination of password and TDE)
For information about encryption methodologies and choosing an encryption algorithm, see Configuring Backup Encryption in Oracle Database Backup and Recovery User’s Guide.

We will be using the dual-mode encryption.

Follow the note https://docs.oracle.com/en/cloud/paas/db-backup-cloud/csdbb/backing-oracle-database-backup-cloud-service-using-transparent-data-encryption-tde.html#GUID-CF813DCB-EF00-4FCB-9C6F-B67E2269F05C and implement the TDE encryption

Note: Whenever the database is restarted, open the TDE wallet with the following command:

Enable Archive log:

Enable the database in archivelog mode so that the database hot backup can be taken online.

Open the Wallet every time DB is restarted:

You can also create db start on trigger so that it will be taken care of

Configure backup:

Sample RMAN backup to cloud

Backup completion output:

Continue to Part 2 …HERE!

Related Posts

Let us fetch you the latest from Oracle!





Not a robot?
Enter the sum of 8 + 9 below:

* Indicates required field.

Success! Thank you!