Oracle by Example brandingBack Up Oracle Databases to Database Backup Cloud Service

section 0Before You Begin

This tutorial shows you how to back up an Oracle database to a container by using Oracle Database Backup Cloud Service. This tutorial takes approximately 15 minutes to complete.

Background

Oracle Database Backup Cloud Service is a secure, scalable, on-demand storage solution for backing up Oracle databases to Oracle Cloud. The service complements your existing backup strategy by providing an off-site storage location in the public cloud.

To use Oracle Database Backup Cloud Service you’ll subscribe to the service, install the Oracle Database Cloud Backup Module, and configure your environment to send backups to the cloud. You can then use familiar Recovery Manager (RMAN) commands to perform backup, restore, recovery, and maintenance operations.

You can also use the backup to create an Oracle Database Cloud Service database deployment and an Oracle Database Exadata Cloud Service database deployment.

What Do You Need?

Before you install the Oracle Database Cloud Backup Module, make sure you have what you need:

  • A supported Oracle Database version and operating system. See Supported Databases and Operating Systems.
  • An Oracle Technology Network (OTN) account or Oracle.com account
  • An Oracle Database Backup Cloud Service account and storage capacity
  • JDK 1.7 or later
  • If you’re using the Standard Edition of Oracle Database, the required patch as described in My Oracle Support Doc ID 1640149.1 at http://support.oracle.com
  • Values for the parameters required to run the Oracle Database Cloud Backup Module installer. See Parameters Used to Run the Backup Module Installer.

section 1Download the Oracle Database Cloud Backup Module Installer

  1. Navigate to the Oracle Database Cloud Backup Module page on the Oracle Technology (OTN) web site.
  2. Accept the license agreement, click All Supported Platforms, and provide your OTN user name and password when prompted.
    Description of the illustration OTN_Download.png
  3. Download the ZIP file that contains the installer (opc_installer.zip) to your system.
  4. Extract the contents of the file.
    [oracle@host01 opc]$ unzip opc_installer.zip 
    Archive:  opc_installer.zip
      inflating: opc_install.jar         
      inflating: opc_readme.txt

section 2Install the Oracle Database Cloud Backup Module

  1. You must have a wallet directory in the $ORACLE_HOME/dbs directory. If you do not, create one as shown in this example:
    [oracle@host01 dbhome_1]$ cd $ORACLE_HOME/dbs
    [oracle@host01 dbs]$ mkdir wallet
  2. Install the Database Backup Cloud Module as shown in this example:
    [oracle@host01 opc]$ java -jar opc_install.jar 
    -host https://example.storage.oraclecloud.com/v1/Storage-example019 
    -opcId 'dbcsadmin@example.com' -opcPass 'Pass_w0rd' 
    -walletDir /u01/app/oracle/product/12.2.0/dbhome_1/dbs/wallet 
    -libDir /u01/app/oracle/product/12.2.0/dbhome_1/lib

section 3Configure RMAN Settings

  1. Log in to Recovery Manager (RMAN).
  2. Configure RMAN for a backup to the cloud as shown in this example. When you installed the Database Cloud Backup Module, the opcorcl.ora file was created in the $ORACLE_HOME/dbs directory.
    RMAN> CONFIGURE CHANNEL DEVICE TYPE sbt
    PARMS='SBT_LIBRARY=/u01/app/oracle/product/12.2.0/dbhome_1/lib/libopc.so,
    SBT_PARMS=(OPC_PFILE=/u01/app/oracle/product/12.2.0/dbhome_1/dbs/opcorcl.ora)';
    
  3. If not configured, configure control file and server parameter file (SPFILE) autobackup.
    RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;

section 4Configure Backup Compression

You can optionally use compression when backing up Oracle databases to Oracle Database Backup Cloud Service. Compression conserves bandwidth by reducing the size of your backups before they are sent to the cloud.

If you have the Oracle Advanced Compression option, Recovery Manager (RMAN) supports binary compression using one of the following compression levels: HIGH, MEDIUM, BASIC, and LOW. The recommended level for cloud backups is MEDIUM.

  1. If you have the Oracle Advanced Compression option, configure MEDIUM level compression
    RMAN> CONFIGURE COMPRESSION ALGORITHM 'MEDIUM';
  2. If you do not have the Oracle Advanced Compression option, configure default compression.
    RMAN> CONFIGURE COMPRESSION ALGORITHM 'BASIC';
  3. Configure RMAN to create compressed backup sets by default on the SBT device type.
    RMAN> CONFIGURE DEVICE TYPE sbt BACKUP TYPE TO COMPRESSED BACKUPSET;

section 5Back Up the Database

A default storage container is created automatically when you install the Oracle Database Cloud Backup Module, and backups are stored as objects in this default container.

  1. Log in to RMAN if you are not logged in.
  2. Set the encryption password as shown in this example:
    RMAN> SET ENCRYPTION ON IDENTIFIED BY 'my_pswd' ONLY;
  3. Create a backup of the entire database:
    RMAN> BACKUP DEVICE TYPE sbt DATABASE;
  4. After the backup completes, log out of RMAN.

section 6View the Backup

  1. Sign in to Oracle Cloud.
  2. Expand the navigation menu on the Dashboard page.
  3. Click Storage to open the service console.
  4. On the Containers tab you can view the container that was created when you backed up the database, as shown in this example:
    Description of the illustration Storage_ContainerList.png
  5. Log out of Oracle Cloud.

more informationWant to Learn More?