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.
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:
- AKI is the Access Key ID you received from Amazon S3.
- SAK is the Secret Access Key from Amazon S3.
- User is your OTN user.
- 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 220.127.116.11 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 18.104.22.168 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.
8 Responses to “Let Your Oracle Backups Be Up in the Clouds”
Leave a Reply