Backup Oracle Database to Oracle Cloud Infrastructure Object Storage

Using Oracle Cloud Backup Module

Oracle databases can be preserved with continuous backup. Once the database is backed up then it can be restored either to the same database or to another database. But, it is an activity that enables organizations to secure their databases in any disastrous situations.

It is a difficult task to come up with a backup strategy and it is an expensive endeavor which depends on company’s Recovery Time Objective and Recovery Point Objective. Any loss of data or any loss of time is a loss especially for large organizations. In that case, how does company strategize the backup and recovery is a difficult problem to solve. The strategy needs to be robust, resilient and cost-effective!

Oracle utilizes the robustness and resilience of Oracle Cloud Infrastructure Object Storage which is very cost effective and can be achieved using a simple module called Oracle Cloud Backup Module. So how do we store data on Oracle Cloud Infrastructure? That’s what this blog describes in a very detailed step-by-step process.

Step 1 : Installing the Oracle Database Cloud Backup Module for OCI

Basic requirements before installing the module

  1. Support Oracle Database Version and Operating System
  2. Access to Oracle Technology Network (OTN)
  3. OCI Cloud Account and access to Object Storage
  4. Access keys and Tenancy OCID and User OCID (Oracle Cloud Identifier)
  5. Java 1.7 or later
  6. For SE edition Database please read the following doc DOC ID 1640149.1

Install the Backup Module

Create an object storage bucket on OCI

Object Storage Bucket

To install the module download the module from OTN and unzip on your DB Server

Download the module
Unzip the module
Module contents

Run the command to install the module

java -jar oci_install.jar
-pvtKeyFile oci_private_key -pubFingerPrint oci_public_fingerprint
-uOCID user_ocid -tOCID tenancy_ocid
-walletDir /wallet_directory -libDir /library_directory
-bucket oci_backup_bucket

Other parameter and detail of the parameters can be found here.

Once you run the command, backup module is installed and configured to push the backups to Object Storage on OCI

Backup module installation

Configure RMAN to use Object Storage as Backup Location

Log into RMAN environment

show all;
Check default RMAN configuration

Preserve the original RMAN configuration to revert back in case of failure

Configure SBT Type backup to point to the new backup location which is Oracle Object Storage in this case

CONFIGURE CHANNEL DEVICE TYPE sbt PARMS='SBT_LIBRARY=<path_to_lib_dir>/, SBT_PARMS=(OPC_PFILE=<path_to_config_dir>/oci_config.ora)’;
Configure channel

Configure compression algorithm to medium which is the recommended level for cloud backups and backups must be in form of backupset, not image copies

Configure compression
Configure backupsets

All backups to Oracle Cloud must be encrypted which can either be TDE based encryption or Password based encryption, in case, if TDE is enabled on database run following command

set encryption on;
Encrypt Backup with TDE

Else, enable password based encryption in the following way

Encrypt backup with password

Backup the database to Object Storage

Once the encryption is enabled you have completed basic RMAN configuration to backup to Object Storage

You can test your configuration by issuing a backup command to backup only controlfile and then perform backup of the database,

Backup controlfile
Backup full database

Once the backup is complete, all your backup files will reside in OCI Object Storage Bucket, which can replicated to various OCI regions using replication policies.

Backup on OCI OS

These are series of blogs that I’ll be publishing that’ll cover restoration process and backups on DBCS and many more… Stay tuned!

About Author:

Phani Turlapati is a Cloud Engineer at Oracle Inc. He’s been with Oracle for over 3 years. He started out at Solution engineering hub at Oracle focusing on various design solutions to help customer to value-add to their businesses. He’s a part of Database Team focusing on all things database. Prior to Oracle he had worked as Software Engineer developing application on Java Platform.

The blog is my view and is no way related to Oracle

Feel free to comment on the above post. Your feedback is valuable!

Senior Cloud Architect

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Get Proper Nouns in a String using Java: NLP API

WidgetStudio: FileMaker Value Add

Cloudant Partitioned Databases — Introduction

HoloBuilder 101: Integrate Autodesk BIM 360-Issues with HoloBuilder

Gaspal — Find the cheapest gas station

Socket Programming in Python: Client, Server, and Peer Examples

How to split an Excel XLSX into Separate Worksheets in C# .NET Framework

What I learnt from my first group coding project at Makers Academy

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Phani Turlapati

Phani Turlapati

Senior Cloud Architect

More from Medium

Getting started (again) with Kubernetes on Oracle Cloud

OCI Load Balancer — Part-I

Kubernetes Secrets and ConfigMaps

Kubernetes Installation on Openstack VM’s with Kubeadm

Kubernetes Pods