\

Wednesday, June 29, 2016

How to Backup an Oracle Database into the Cloud

In this post I want to describe how you can backup your DB into the cloud using the Oracle Database Cloud Backup Service.

First of all, you must buy the service from Oracle but at this time you can use their free 30-day trial of the service. All this information you can find  on cloud.oracle.com

The next step is to download and install Backup Module OPC.

To install the module use this command:

java -jar opc_install.jar -serviceName myService
-identityDomain myDomain -opcId 'myAccount@myCompany.com'
-opcPass 'myPassword' -walletDir /walletDirectory
-libDir /libraryDirectory


Now, you need to configure RMAN to use the Oracle Database Cloud Backup Service.

Here is an example of that command:

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'SBT_TAPE' TO '%F';
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE 'SBT_TAPE' TO 1;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE 'SBT_TAPE' TO 1;
CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 3 BACKUP TYPE TO COMPRESSED BACKUPSET;
CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS  'SBT_LIBRARY=/home/oracle/OPC/lib/libopc.so ENV=(OPC_PFILE=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/opcorcle.ora)';



After RMAN is configured then you can perform a backup.

Here is an example:

set encryption on identified by "PASSWORD" only;
run
{
allocate channel d1 TYPE sbt PARMS="SBT_LIBRARY=/home/oracle/OPC/lib/libopc.so,ENV=(OPC_PFILE=/u01/app/oracle/product/11.2.0/db_1/dbs/opcKRAZOO1.ora,ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1)";
backup incremental level 0 database; }



When your backup is completed you can check it by using command:

list backup;


No comments:

Post a Comment