Let Your Oracle Backups Be Up in the Clouds

Posted in: Technical Track

There are a lot of discussions going on in the Internet regarding whether we can trust third parties to look after our data. I am not going to add fuel to the fire. I am going to show you how simple it is to backup an Oracle database to the Storage Cloud using the Oracle Secure Backup (OSB) Cloud Module.

First, you need to sign up for an Amazon S3 account and get an Access Key ID and a Secret Access Key. Check AWS pricing first.

Next, download the OSB Cloud Module and unzip it.

[oracle@lin32 distrib]$ ls -l
total 2428
-rw-r--r-- 1 oracle oinstall 2480195 Jan 19 18:13 osbws_installer.zip
[oracle@lin32 distrib]$ unzip osbws_installer.zip
Archive:  osbws_installer.zip
  inflating: osbws_readme.txt
  inflating: osbws_install.jar

Next, create a shell script with the java command using your parameters:

  1. AKI is the Access Key ID you received from Amazon S3.
  2. SAK is the Secret Access Key from Amazon S3.
  3. User is your OTN user.
  4. Password is your OTN password.
[oracle@lin32 distrib]$ vi osbws_install.sh
[oracle@lin32 distrib]$ cat osbws_install.sh
java -jar osbws_install.jar -AWSID AKI -AWSKey SAK -otnUser User -otnPass Password -walletDir $ORACLE_HOME/dbs/osbws_wallet
[oracle@lin32 distrib]$ chmod u+x osbws_install.sh

Now run the script to install the module.

[oracle@lin32 distrib]$ ./osbws_install.sh
Oracle Secure Backup Database Web-Service Install Tool
OTN userid is valid.
AWS credentials are valid.
Creating new registration for this S3 user.
Created new log bucket.
Registration ID: ***
S3 Logging Bucket: oracle-log-alisher--1
Validating log bucket location ...
Validating license file ...
Create credential oracle.security.client.connect_string1
OSB web-services wallet created in directory /u01/app/oracle/product/11.2.0/dbhome_1/dbs/osbws_wallet.
OSB web-services initialization file /u01/app/oracle/product/11.2.0/dbhome_1/dbs/osbwsDB19TST.ora created.

To use the OSB Cloud Module you need to set up an RMAN configuration for the SBT type device.

RMAN> configure channel device type SBT parms 'SBT_LIBRARY=/u01/app/oracle/product/11.2.0/dbhome_1/lib/libosbws11.so ENV=(OSB_WS_PFILE=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/osbwsDB19TST.ora)';

new RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS  'SBT_LIBRARY=/u01/app/oracle/product/11.2.0/dbhome_1/lib/libosbws11.so ENV=(OSB_WS_PFILE=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/osbwsDB19TST.ora)';
new RMAN configuration parameters are successfully stored

The OSB Cloud Module is installed and configured. Let’s take a full compressed backup of the database. It is recommended to encrypt the backup when the backup is put in the Cloud.

RMAN> set encryption on for all tablespaces algorithm 'AES128' identified by * only;
executing command: SET encryption

RMAN> backup device type sbt tag 'BACKUP_DB19TST_000_012010015857' database;
Starting backup at 20-JAN-10
allocated channel: ORA_SBT_TAPE_1
channel ORA_SBT_TAPE_1: SID=41 device type=SBT_TAPE
channel ORA_SBT_TAPE_1: Oracle Secure Backup Web Services Library
channel ORA_SBT_TAPE_1: starting compressed full datafile backup set
channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/oradata/DB19TST/datafile/o1_mf_system_5lbbz08j_.dbf
input datafile file number=00002 name=/u01/oradata/DB19TST/datafile/o1_mf_sysaux_5lbbzny4_.dbf
input datafile file number=00003 name=/u01/oradata/DB19TST/datafile/o1_mf_undotbs1_5lbc027k_.dbf
input datafile file number=00004 name=/u01/oradata/DB19TST/datafile/o1_mf_users_5lbc0yh0_.dbf
channel ORA_SBT_TAPE_1: starting piece 1 at 20-JAN-10
channel ORA_SBT_TAPE_1: finished piece 1 at 20-JAN-10
piece handle=0ul3uhcs_1_1 tag=BACKUP_DB19TST_000_012010015857 comment=API Version 2.0,MMS Version 2.0.0.0
channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:17:08
channel ORA_SBT_TAPE_1: starting compressed full datafile backup set
channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_SBT_TAPE_1: starting piece 1 at 20-JAN-10
channel ORA_SBT_TAPE_1: finished piece 1 at 20-JAN-10
piece handle=0vl3uid0_1_1 tag=BACKUP_DB19TST_000_012010015857 comment=API Version 2.0,MMS Version 2.0.0.0
channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:45
Finished backup at 20-JAN-10

So, you can see that using the OSB Cloud Module is both very simple and fully compatible with existing backup scripts and EM.

And when you need to recover the database, the backup comes just as if it were on tape, only it comes down from the Cloud.

Interested in working with Alisher? Schedule a tech call.

8 Comments. Leave new

Blogroll Report 05/02/2009 – 12/02/2010 « Coskan’s Approach to Oracle
March 9, 2010 9:28 pm

[…] Alisher Yuldashev -Let Your Oracle Backups Be Up in the Clouds […]

Reply
Andrew Eells
May 20, 2010 8:25 am

Alisher, given that you’ve obviously got this up and running yourself, can you provide any guidance on the problem I have?

http://developer.amazonwebservices.com/connect/thread.jspa?threadID=46794

As far as I can tell I have executed exactly the same steps as yourself.
It looks as though your logging bucket is specific to your name though – S3 Logging Bucket: oracle-log-alisher–1 – how did that get set up with your name in it? Is that a step you had to accomplish beforehand?

Appreciate any guidance you might be able to give!
Thanks and kind regards,
Andrew Eells

Reply
Alisher Yuldashev
May 25, 2010 1:54 pm

Hi Andrew,

Thank you for your question.
I don’t think your issue is related to the OSB Cloud Module installation. It looks like there is a problem with your AWS account.
I would recommend you contacting the AWS support.

Alisher

Reply

Trying to find the OSB Cloud Backup Module on OTN, i googled it. Never find it, need help.

Reply
Anshuman Bhartiya
February 24, 2011 8:03 pm

Hi Alisher,

I have already backed up my database on the Amazon S3 bucket via the OSB Cloud Module.

But, I am having difficulty finding documentation on how to recover this database to a new host.

I want to use it as a DR solution. Everywhere on the internet and in books, they have only explained how to backup via RMAN on the S3 bucket but nobody has explained how to recover this database.

Can you please guide me?

Thanks,
Anshuman

Reply

Hi All,

I’ve configured Amazon S3 (OSB Cloud Module), but when I am starting RMAN it hangs. I have setup the channel device type also.

Please let me know your statements and outputs.

Thanks
Suraj

Reply

Hi All,
Can you please share your thoughts on how to use location parameter of installation of jar file since i have all my backup in east bucket and then transferred them to west and now i need to do DR setup based on west S3 bucket.

Thanks,
Vamshi .D

Reply

Leave a Reply

Your email address will not be published. Required fields are marked *