Cloud, Contributions, Oracle

Back-up to Cloud

Over the last few years, a proliferation of web services paved the way for saving enterprise back-ups. Oracle recently added the Oracle secure back-up (OSB) cloud module to its inventory of back-up solutions, which allows RMAN to write database back-ups directly to the Amazon storage cloud. It offers all the major features of RMAN and provides a cost-effective alternative to tape and online storage. This document highlights some of the steps involved in configuring RMAN backup to the Amazon cloud.


OS: OSB is currently supported on Linux & Window platforms.

JAVA: JDK 1.5 or higher is required to run the cloud module to configure the environment.

Note: Typically Oracle database 11gR2 installation may contain Java 1.5 JDK. This can be used in case the server doesn’t have the appropriate JDK installed. JDK location under Oracle home –

Installed version can be verified as follows:

export JAVA_HOME=/u01/app/oracle/product/

$JAVA_HOME/bin/java -version
java version “1.5.0_30”
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_30-b03)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_30-b03, mixed mode)

OTN login: A valid OTN account is required to download the web services library during the installation.

AWS: A valid login is required, which can be registered at Once the account is set up, download AWS identifiers (Access Key ID & Secret Access Key) on to the server where the cloud back-up needs to be configured.

S3 backup Installer: osbws_install.jar – This can be downloaded (OTN login is required to download) from the following location:

Wallet Directory: Create a directory under $ORACLE_HOME/dbs. This will be used by the installer to save the wallet file that contains AWS identifiers.


Installing the AWS cloud module is pretty straightforward. Some of the details that are gathered under requirements need to be passed as relevant arguments to the OSB installer (OSBWS_Installer.jar).

  • AWSID: This is the AWS access key id that needs to be downloaded from AWS
  • AWSKey: AWS secret access key that needs to be downloaded from AWS as well
  • otnUser: A valid email address that might have been used during the OTN account creation
  • otnPass: Relevant OTN password
  • walletDir: Wallet directory location that is created above as a part of requirements
  • libDir: This is typically $ORACLE_HOME/lib (could be different on Windows platform)

Prepare an executable shell script as a wrapper for setting up environment and running the installer.


export ORACLE_HOME=/u01/app/oracle/product/
export JAVA_HOME=/u01/app/oracle/product/
-otnUser -otnPass SECRET -walletDir $ORACLE_HOME/dbs/AWS_RMAN_WALLET
-libDir $ORACLE_HOME/lib/

Verify all the arguments and execute the script…


Oracle Secure Backup Database Web-Service Install Tool, build 2011-02-04.0001
AWS credentials are valid.
Creating new registration for this S3 user.
Created new log bucket.
S3 Logging Bucket: oracle-log-XXX-1
Validating log bucket location …
Validating license file …
Create credential
OSB web-services wallet created in directory /u01/app/oracle/product/
OSB web-services initialization file /u01/app/oracle/product/ created.

Downloading OSB Web Services Software Library from file
Downloaded 21525230 bytes in 17 seconds. Transfer rate was 1266190 bytes/second.
Download complete.
Extracted file /u01/app/oracle/product/


Once the installation is complete, RMAN backup can be run as follows…

rman target / nocatalog

Recovery Manager: Release – Production on Thu Sep 12 17:38:29 2013

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

connected to target database: XXXXXX (DBID=3275161976)
using target database control file instead of recovery catalog

RMAN> run {
allocate channel dev1 type
sbt parms=’SBT_LIBRARY=/u01/app/oracle/product/,
backup tablespace users;
}2> 3> 4> 5> 6>

released channel: ORA_DISK_1
allocated channel: dev1
channel dev1: SID=416 device type=SBT_TAPE
channel dev1: Oracle Secure Backup Web Services Library
Starting backup at 12-SEP-13
channel dev1: starting full datafile backup set
channel dev1: specifying datafile(s) in backup set
input datafile file number=00004 name=+DATA/XXXXXX_pr/datafile/users.266.787577749
input datafile file number=00005 name=+DATA/XXXXXX_pr/datafile/users.311.810392265
input datafile file number=00006 name=+DATA/XXXXXX_pr/datafile/users.316.820977173
channel dev1: starting piece 1 at 12-SEP-13
channel dev1: finished piece 1 at 12-SEP-13
piece handle=64ojmbvt_1_1 tag=TAG20130912T180133 comment=API Version 2.0,MMS Version
channel dev1: backup set complete, elapsed time: 00:00:07
Finished backup at 12-SEP-13
released channel: dev1
NOTE: Channel parameters can be saved in the RMAN configuration as well to make the settings persistent across all the backup executions.

Backup Timing Comparison:



Configuring RMAN back-up to the cloud is pretty straightforward and can be used as a viable alternative to tape or online back-ups. When used in conjunction with RMAN encryption and compression may reduce the cloud storage costs and satisfy the compliance requirements.

About The Author

Kishore Kottapalli

Kishore Kottapalli has been an Oracle DBA for 15 years, handling all areas of Oracle database administration. He has a special interest in Oracle performance tuning & NoSQL databases.