Installing the Oracle Database Cloud Backup Module for OCI

To back up to Oracle Cloud Infrastructure, you first need to install the Oracle Database Cloud Backup Module for OCI. You’ll download the module from Oracle Technology Network (OTN) and install it on your database server.

Before You Begin Installing Oracle Database Cloud Backup Module for OCI

Before you install the Oracle Database Cloud Backup Module for OCI, 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

    If you don’t have an OTN account, create one by registering at http://www.oracle.com/technetwork/index.html.

  • An Oracle Cloud account with access to Oracle Cloud Infrastructure Object Storage

    See Object Storage in the Oracle Cloud Infrastructure Documentation.

  • Oracle Cloud Infrastructure API signing keys, tenant OCID, and user OCID

    You may specify a compartment ID. However, if the compartment ID is not specified, the tenant ID is used as the compartment ID.

    See Required Keys and OCIDs.

  • JDK 1.7 or later

    You must have JDK 1.7 or later on the system on which you plan to install the Oracle Database Cloud Backup Module for OCI. Use the following command to check your JDK version:

    java -version

  • The required patch if you’re using the Standard Edition of Oracle Database

    See My Oracle Support Doc ID 1640149.1 at http://support.oracle.com.

  • Values for the parameters required to run the installer for Oracle Database Cloud Backup Module for OCI

    It’s best to compile this information before you run the installer. See Parameters to Run the Oracle Database Cloud Backup Module for OCI.

Note:

If your database server has multiple Oracle homes, the Oracle Database Cloud Backup Module for OCI must be installed into each ORACLE_HOME. Alternatively, you can copy the library file (libopc.so or oraopc.dll, depending on your operating system) to other Oracle home library locations, along with the opcSID.ora configuration file (assuming you're using the same cloud credentials for backing up all databases in the database server).

Copy and rename the opcSID.ora file for each database instance you are backing up to the cloud, where SID matches the SID for the database instance.

Supported Databases and Operating Systems

You can back up Oracle Database 11g Release 2 (11.2.0.4) and later to Oracle Database Backup Cloud Service.

The following table lists supported database versions and operating systems for operations with Oracle Cloud Infrastructure and Oracle Cloud Infrastructure Classic. It also lists supported Recovery Manager (RMAN) compression and encryption options. For information about these optimizations, see About Oracle Database Backup Cloud Service.

System Supported Versions

Oracle Database*

Enterprise Edition: 11g Release 2 (11.2.0.4) and later

Standard Edition (SE, SE1, SE2): 11g Release 2 (11.2.0.4) and later

* Unsupported Oracle Database versions are in deprecated mode. See My Oracle Support Doc ID 1640149.1 at http://support.oracle.com for the latest support matrix.

Operating system (64 bits)

Linux, Solaris x86-64, SPARC, Windows, AIX, HP-UX, zLinux

RMAN compression

HIGH, MEDIUM, BASIC, LOW

RMAN encryption

Enterprise Edition: Password, Transparent Data Encryption (TDE), dual mode.

Standard Edition: Password, TDE, dual mode. Requires a patch. Refer to My Oracle Support Doc ID 1640149.1 at http://support.oracle.com.

Parameters to Run the Oracle Database Cloud Backup Module for OCI

You must specify parameters and their values when you run the Oracle Database Cloud Backup Module for OCI installer. It’s best to compile this information before you run the installer.

Parameters include the host name for the Oracle Cloud Infrastructure account and the private key used to sign Oracle Cloud Infrastructure API requests. Parameters can also be displayed by running the following command from the directory that contains the oci_install.jar installer file:

java -jar oci_install.jar

The following example shows what you’ll need to provide:

java -jar oci_install.jar
-host https://objectstorage.us-phoenix-1.oraclecloud.com
-pvtKeyFile oci_private_key -pubFingerPrint oci_public_fingerprint 
-uOCID user_ocid -tOCID tenancy_ocid
-walletDir /wallet_directory -libDir /library_directory

The following table lists the required and optional parameters.

Parameter Description Required or Optional

-host

End point of the Oracle Cloud Infrastructure account. For information about finding the Native Oracle Cloud Service Object Storage API endpoints for your account, see the Object Storage FAQs in the Oracle Cloud Infrastructure documentation.

Required

-pvtKeyFile

File that contains the private key used to authenticate Oracle Cloud Infrastructure API requests. The key file must be in PEM format. See Required Keys and OCIDs in Oracle Cloud Infrastructure Documentation for information about generating API signing keys.

This private key is never transmitted outside of the computer where the installer is run.

Required

-pubFingerPrint

Finger print of the public key paired with the specified private key. The finger print tells Oracle Cloud Infrastructure which private and public key pair is used to authenticate the API requests

Required

-tOCID

Tenancy OCID for the Oracle Cloud Infrastructure account. See Required Keys and OCIDs in Oracle Cloud Infrastructure Documentation for information about obtaining the tOCID and uOCID.

Required

-uOCID

User OCID for the Oracle Cloud Infrastructure account.

Required

-bucket

Name of the bucket in which backups are stored. If this bucket does not exist, then the installer creates it.

When this parameter is omitted, a default bucket is automatically created to store backups.

Optional

-cOCID

Resource compartment ID for the Oracle Cloud Infrastructure account. The default value is the tenancy OCID if not specified.

Optional

-newRSAKeyPair

Set up a new pair of public and private RSA keys for authentication. If specified, the installer generates a random RSA private and public key pair of 2048 bits and stores them in the specified Oracle wallet directory.

Optional

-walletDir

Directory in which Oracle Cloud Infrastructure Object Storage credentials are stored.

Suggested location on Linux and UNIX systems:

ORACLE_HOME/dbs/opc_wallet

Suggested location on Windows systems:

ORACLE_HOME\database\opc_wallet

If the specified wallet directory does not exist (for example, opc_wallet), the installer creates it.

Required

-libDir

Directory in which the system backup to tape (SBT) library used for backups and restores with Oracle Cloud Infrastructure is stored.

If omitted, the library is not downloaded. In most cases, you should specify this parameter and download the library. An exception might be if you’re using the installer to regenerate the wallet and configuration file in an Oracle home directory where the Oracle Database Cloud Backup Module for OCI was previously installed.

Suggested location on Linux and UNIX systems:

ORACLE_HOME/lib

Suggested location on Windows systems:

ORACLE_HOME\bin

If the specified directory does not exist, you are prompted to create it and then run the installer again.

Required if you want to download the latest module

Optional if you just want to update the password after you change it in Oracle Cloud

-libPlatform

Operating system for the SBT library used for backups and restores.

In most cases, you don’t need to specify this parameter because the installer automatically determines the correct operating system.

Exceptions might be if you see error messages indicating your operating system can’t be identified or if you need to download the library for use on a different system.

Supported values for this parameter:
  • linux64

  • windows64

  • solaris_sparc64

  • solaris_x64

  • zlinux64

  • hpux_ia64

  • aix_ppc64

For information about supported operating systems, see Supported Databases and Operating Systems..

Optional

-lib-download-only

Downloads only the SBT library. Use this parameter to update the library without making changes to the configuration file and the wallet.

Optional

-configFile

Directory in which the Oracle Database Cloud Backup Module for OCI configuration file is stored. If omitted, the configuration file is stored in a default location.

Default location on Linux and UNIX systems:

ORACLE_HOME/dbs

Default location on Windows systems:

ORACLE_HOME\database

The file name is opcSID.ora, where SID is the system identifier of the Oracle database being backed up to Oracle Cloud Infrastructure Object Storage Service.

Optional

-trustedCerts

Comma-separated list of SSL certificates that must be added to the wallet. If the installer is unable to retrieve the certificates required for the SSL connection from local Java truststore, this SSL certificates specified by this parameter are imported. All SSL certificates must be in the PEM format.

Optional

-import-all-trustcerts

Import all X509 certificates from the Java truststore.

Optional

-proxyHost

HTTP proxy server host name

Optional

-proxyPort

HTTP proxy server port number

Optional

-proxyId

HTTP proxy server user name, if needed.

Optional

-proxyPass

HTTP proxy server password, if needed.

Optional

-argFile

Indicates that parameters should be read from the specified file. For example, a file named arguments.txt might contain the following:

-opcID 'myAccount@myCompany.com'
-opcPass 'abc123$'
-host https://objectstorage.us-phoenix-1.oraclecloud.com
-libDir /home/oracle/OPC/lib
-walletDir /home/oracle/OPC/wallet

For this example, the following command installs the Oracle Database Cloud Backup Module for OCI using the parameters specified in the file:

java -jar oci_install.jar -argFile arguments.txt

Optional

-enableArchiving

Whether backups must be automatically moved from standard Object Storage buckets to Archive Storage. The default value is FALSE. Set this parameter to TRUE to enable automatic archival of backups.

Backups are automatically moved to Archive Storage if they meet the criteria set by the object lifecycle policy rule that is associated with the bucket containing the backups. The installer creates an appropriate lifecycle policy rule using the values of the archiveAfterBackup and retainAfterRestore parameters. Do not modify this policy rule. See Using Object Lifecycle Management in the Oracle Cloud Infrastructure Documentation.

Optional
-archiveAfterBackup

Period of time, in days or years, after which backups are moved from standard Object Storage to Archive Storage. The default is 0 days. This means that the backups are moved to Archive Storage any time between 0 and 24 hours from the time they were created. Examples:

-archiveAfterBackup "25 days"
-archiveAfterBackup "1 year"
Optional
-retainAfterRestore

Period of time, in hours, for which backups that were restored from Archive Storage to standard Object Storage are retained in the Object Storage bucket. The default is 48 hours. Example:

-retainAfterRestore "24 hours"

While restoring using archived backups, the backups must first be recalled from Archive Storage. Recalled backups are retained in Object Storage for the time specified by retainAfterRestore. After the specified time elapses, the backups return to Archive Storage.

Optional

Downloading and Installing the Oracle Database Cloud Backup Module for OCI

Download and install the Oracle Database Cloud Backup Module for OCI on your database server.

To download and install the Oracle Database Cloud Backup Module for OCI:
  1. Download the Oracle Database Cloud Backup Module for OCI from Oracle Technology Network (OTN):

    https://www.oracle.com/database/technologies/oracle-cloud-backup-downloads.html

    Accept the license agreement, click All Supported Platforms, and provide your OTN user name and password when prompted. Then download the ZIP file that contains the installer (opc_installer.zip) to your system.

  2. Extract the contents of the zip file.

    The file contains two directories, oci_installer and opc_installer, and a README file.

  3. (Optional) To configure automatic movement of backups from standard Object Storage to Archive Storage, authorize the Object Storage service to move backups to Archive Storage. See Service Permissions in the Required IAM Policies section of the Oracle Cloud Infrastructure documentation.
  4. Run the installer, oci_install.jar, from the oci_installer directory. Provide the required parameters in one line, with each parameter preceded by a hyphen and followed by its value. For information about required parameters, see Parameters to Run the Oracle Database Cloud Backup Module for OCI.

Example 2-1 Installing the Oracle Database Cloud Backup Module for OCI

The following is an example run of the installer. This example shows how the installer automatically downloads the Oracle Database Cloud Backup Module for OCI for your operating system, creates a wallet that contains Oracle Database Backup Cloud Service identifiers and credentials, creates the backup module configuration file, and downloads the library necessary for backups and restores to Oracle Cloud Infrastructure.

% java -jar oci_install.jar -host https://objectstorage.us-phoenix-1.oraclecloud.com 
  -pvtKeyFile /oracle/dbs/oci_wallet/oci_pvt 
  -pubFingerPrint e5:10:06:b1:fb:24:ef:db:46:21:16:20:46:jk:th:35 
  -uOCID ocid1.user.oc1..aaaaaaaasd754pijuwheaq67t7tninefkn7z7aibtusj7jqac5lpm7wm37va 
  -tOCID ocid1.tenancy.oc1..aaaaaaaavjhvwf4c7q2ozzyduh7njrft58i6ts3ryjk7v83w7q4wdr2ka 
  -walletDir /oracle/dbs/oci_wallet 
  -libDir /oracle/lib 
  -bucket db_backups
Oracle Database Cloud Backup Module Install Tool, build 2018-12-11
Oracle Database Cloud Backup Module credentials are valid.
Backups would be sent to bucket db_backups.
Oracle Database Cloud Backup Module wallet created in directory /oracle/dbs/oci_wallet.
Oracle Database Cloud Backup Module initialization file /oracle/dbs/opcb18test.ora created.
Downloading Oracle Database Cloud Backup Module Software Library from file opc_linux64.zip.
Download complete.

Example 2-2 Enabling Automatic Archival of Backups When Installing the Oracle Database Cloud Backup Module for OCI

This example installs the Oracle Database Cloud Backup Module for OCI and creates a standard bucket named backup_archival_60, with archiving enabled. Backups stored in this bucket are automatically moved from standard Object Storage to Archive Storage 60 days after they are created. During a restore operation, backups recalled from Archive Storage are retained in the Object Storage bucket for 72 hours. An object lifecycle policy is created and associated with the bucket backup_archival_60. The information specified in the -archiveAfterBackup and -retainAfterRestore parameters are stored in this object lifecycle policy.

Before you run the installer, ensure that you authorize the Object Storage service to move backups to Archive Storage, as described in Step 3.

%java -jar oci_install.jar 
  -host https://objectstorage.us-phoenix-1.oraclecloud.com 
  -pvtKeyFile /home/database/oci_wallet/oci_pvt 
  -pubFingerPrint fe:13:f2:dc:2f:81:5c:df:86:2d:64:58:cd:8h:98:24 
  -tOCID ocid1.tenancy.oc1..aaaaaaaafrhvkt6s8z2ozzyjth9njwq3img95ivsd3vcmj3v53k7q5yhc8le 
  -uOCID ocid1.user.oc1..aaaaaaaarg468pilujhpaj45t1mjsesurg5z7sapuedm5jqax47pm2cx7lva 
  -cOCID ocid1.compartment.oc1..aaaaaaaasgtffvkghd7w9rgtsky3mkozabkdl3y2u3ymluresxk4spq63smq 
  -libDir $ORACLE_HOME/lib -walletDir /database/dbs/oci_wallet 
  -enableArchiving true 
  -archiveAfterBackup "60 days" -retainAfterRestore "72 hours" 
  -bucket backup_archival_60 
  -configFile $ORACLE_HOME/oci_config.ora
Oracle Database Cloud Backup Module Install Tool, build 19.3.0.0.0DBBKPCSBP_2019-10-09
Oracle Database Cloud Backup Module credentials are valid.
Backups would be sent to bucket backup_archival_60.
Oracle Database Cloud Backup Module wallet created in directory /database/dbs/oci_wallet.
Oracle Database Cloud Backup Module initialization file /home/database/oracle/oci_config.ora created.
Downloading Oracle Database Cloud Backup Module Software Library from Oracle Cloud Infrastructure.
Download complete.

Files Created when Oracle Database Cloud Backup Module for OCI is Installed

After you run the installer for the Oracle Database Cloud Backup Module for OCI, make sure the required files are on your system.

The following files are created when you install the backup module and they are used to perform cloud backups and restores. For information about the parameters mentioned, see Parameters to Run the Oracle Database Cloud Backup Module for OCI.

File Location Purpose

libopc.so on Linux and UNIX systems

oraopc.dll on Windows systems

As specified for the —libDir parameter when you run the installer for the Oracle Database Cloud Backup Module for OCI.

Example location:

ORACLE_HOME/lib

Operating system-specific SBT library that enables cloud backups and restores with the Oracle Cloud Infrastructure.

opcSID.ora

As specified for the —configFile parameter when you run the installer for the Oracle Database Cloud Backup Module for OCI.

Default location on Linux and UNIX systems:

ORACLE_HOME/dbs

Default location on Windows systems:

ORACLE_HOME\database

Configuration file that contains theOracle Cloud Infrastructure Object Storage bucket URL and credential wallet location, where SID is the system identifier of the Oracle database being backed up to Oracle Cloud Infrastructure.

cwallet.sso

As specified for the —walletDir parameter when you run the Oracle Database Cloud Backup Module for OCI installer.

Example location:

ORACLE_HOME/dbs/opc_wallet

Oracle wallet file that securely stores Oracle Cloud Infrastructure Object Storage credentials. This file is used during Recovery Manager (RMAN) backup and restore operations and is stored in the Oracle Cloud Infrastructure Object Storage wallet directory (for example, opc_wallet).