High Availbility

OS & Virtualization

Wednesday, July 19, 2017

Oracle Database Backup To Cloud (to Amazon S3)

Oracle Database Backup To Cloud:
Amazon Simple Storage Service (S3)



Amazon Web Services (AWS) is the first Cloud vendor that Oracle has partnered with to enable database backup in the Cloud.


The process is:
  1. Create an AWS S3 account and setup the necessary credentials.
  2. Install an AWS specific Oracle Secure Backup library into your Oracle Home.
  3. Run an RMAN backup using the SBT_TAPE device type.



Creating an AWS S3 Account

Go to -> aws.amazon.com
Under IAM (Identify & Access Management) , select user -> add user






 




Installing the Oracle Secure Backup Cloud Module Jar file






The Oracle Secure Backup (OSB) Cloud Module enables an Oracle Database to send its backups to Amazon S3. It is compatible with Oracle Database versions 9i Release 2 and above, and it requires a network connection to the Internet




From OTN download an installer Java JAR file and copy and extract the zip to your database server. When run, the installer will determine the proper database version and OS platform, as well as download the appropriate library file to your Oracle home or other specified directory.







$ java -jar osbws_install.jar \
>    -AWSID AKI***************QA \
>    -AWSKey no/MD*******************************upxK \
>    -otnUser v
incent.ng@xxxx.com \
>    -walletDir $ORACLE_HOME/dbs/osbws_wallet \
>    -libDir $ORACLE_HOME/lib




RMAN> run {
allocate channel aws_s3 type sbt
parms='SBT_LIBRARY=libosbws.so,SBT_PARMS=(OSB_WS_PFILE=/u01/app/oracle/product/12.1.0/dbhome_2/dbs/osbwsCDB121.ora)';
backup tablespace users;
}