Installing the Oracle Database Cloud Backup Module for OCI Classic

To back up to Oracle Cloud Infrastructure Classic, you first need to install the Oracle Database Cloud Backup Module for OCI Classic. 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 Classic

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

Note:

If your database server has multiple Oracle homes, the Oracle Database Cloud Backup Module for OCI Classic 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.

Parameters Used to Run the Oracle Database Cloud Backup Module for OCI Classic Installer

You’ll need to specify parameters and their values when you run the Oracle Database Cloud Backup Module for OCI Classic installer. Parameters include host (REST endpoint) and account credentials. It’s best to compile this information before you run the installer.

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

java -jar opc_install.jar
-host https://foo.storage.oraclecloud.com/v1/Storage-myIdentity3 
-opcId 'myAccount@myCompany.com' -opcPass 'opc_password'
-walletDir /walletDirectory -libDir /libraryDirectory

The following table lists required parameters. Optional parameters are also listed.

Parameters can also be displayed by running the following command from the directory that contains the opc_install.jar installer file:

java -jar opc_install.jar

Parameter Description Required or Optional

-host

REST endpoint for your service as listed on the service details page. For information about finding the URL for your account, see the documentation for Using Oracle Cloud Infrastructure Object Storage Classic.

For example:

-host https://abc.storage.oraclecloud.com/v1/hr-abc

Required

—opcId

User name for your Oracle Database Backup Cloud Service account.

Enclose the user name in single quotes, for example 'myAccount@myCompany.com'. On Windows systems, use double quotes if the user name contains special characters.

Required

—opcPass

Password for the Oracle Database Backup Cloud Service account specified by —opcId.

Enclose the password in single quotes, for example 'opc_password'. On Windows systems, use double quotes if the password contains special characters.

Required

—walletDir

Directory in which Oracle Database Backup Cloud Service 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 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 Classic 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.

Starting with Oracle Database 23ai, native SBT libraries are included with the target database release version. You no longer have to download the latest SBT library.

If your target database version is 23.0 or higher, then you can optionally skip the -libDir parameter. Configure RMAN to use the target database release version native SBT library instead of downloading a compatible SBT library.

oracle.oci is the predefined alias name for the native SBT library that corresponds to the Backup Cloud Service module.

After installing the database, you can configure the RMAN SBT channel using the alias name oracle.oci. This creates a persistent configuration for RMAN while performing backup and restores to Oracle Cloud.

See, Configuring Channels for Backup and Recovery Operations to learn more about configuring RMAN channels.

See, Configuring RMAN to Use a Native SBT Media Library in the Backup and Recovery User's Guide to learn more about native SBT libraries.

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

If your target database version is 23.0 or higher, then you can optionally skip this parameter. After installing the database, you can configure RMAN to use the native SBT library that corresponds to the backup module.

—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

—container

Custom container created by you, separate from Oracle Database Backup Cloud Service, to store backups. If omitted, backups are stored in the default container that’s created when the backup module is installed. See Storing Backups in Custom Locations.

Note: Containers that are used by Recovery Manager (RMAN) cannot have server-side encryption enabled. Because RMAN backups are already encrypted at the client side, server-side encryption is not required.

Optional

-containerClass

Storage class of the custom container. The valid values for this parameter are:

  • Standard: Represents Standard storage container.

  • Tiering: Represents a Standard storage container whose Lifecycle Tiering Policy is set.

    This option creates a container for which automatic archive is enabled. The tiering policy controls the frequency at which objects stored in this container are archived. The Oracle Database Cloud Backup Module for OCI Classic sets default parameters for the tiering policy. The default tiering policy excludes XML files and moves backups to archive storage immediately.

If this parameter is omitted, then the default is either Standard or the storage class of the container specified using -container, if the container exists.

For more information, see Understanding Storage Tiers.

Optional

-containerLTP

Name of Lifecycle Tiering Policy (LTP) file. This file is a JSON document that specifies the time after which objects in the storage container will be moved to the archive tier and type of objects which can be excluded from being archived.

To create archival backups, specify the name of the LTP file that defines the archival policy for the storage container by using the -containerLTP parameter. You can optionally set -containerClass to Tiering.

Note: The Lifecycle Tiering Policy file must exclude XML files. If this is not done, an error is displayed both when installing and using the Oracle Database Cloud Backup Module for OCI Classic. The exclusions field of the policy must be exactly like the one shown in Example 2-5.

Optional

—configFile

Directory in which the Oracle Database Cloud Backup Module for OCI Classic 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 Database Backup Cloud Service.

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://foo.storage.oraclecloud.com/v1/Storage-myIdentity3
-libDir /home/oracle/OPC/lib
-walletDir /home/oracle/OPC/wallet

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

java -jar opc_install.jar -argFile arguments.txt

Optional

Downloading and Installing the Oracle Database Cloud Backup Module for OCI Classic

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

To download and install the Oracle Database Cloud Backup Module for OCI Classic:
  1. Download the Oracle Database Cloud Backup Module for OCI Classic 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. Run the installer, opc_install.jar, from the opc_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 Used to Run the Oracle Database Cloud Backup Module for OCI Classic Installer.

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

This example shows how the installer automatically downloads the Oracle Database Cloud Backup Module for OCI Classic for your operating system, creates a wallet that contains Oracle Database Backup Cloud Service identifiers and credentials, creates the Oracle Database Cloud Backup Module for OCI Classic configuration file, and downloads the library necessary for cloud backups and restores.

java -jar opc_install.jar -host https://myDomain.storage.oraclecloud.com/v1/myService-myDomain
-opcId 'myAccount@myCompany.com' -opcPass 'opc_pswd1'
-walletDir /home/oracle/OPC/wallet -libDir /home/oracle/OPC/lib
 
Oracle Database Cloud Backup Module Install Tool, build 2017-08-15
Oracle Database Cloud Backup Module credentials are valid.
Oracle Database Cloud Backup Module wallet created in directory /home/oracle/OPC/wallet.
Oracle Database Cloud Backup Module initialization file /orclhome/dbs/opcmySID.ora created.
Downloading Oracle Database Cloud Backup Module Software Library from file opc_linux64.zip.
Download complete.

Example 2-4 Creating a Tiering Container When Installing the Oracle Database Cloud Backup Module for OCI Classic

This example installs the Oracle Database Cloud Backup Module for OCI Classic and creates a container named archive_container for which automatic archive is enabled. To create a container with automatic archiving, you must specify Tiering for the containerClass. A default Lifecycle Tiering Policy is associated with this container and the values specified by the tiering policy control when backups stored in this container are moved to archive storage.

% java -jar opc_install.jar -host https://myDomain.storage.oraclecloud.com/v1/myService-myDomain/ 
  -opcId 'myAccount@myCompany.com' -opcPass 'opc_pswd1' 
  -walletDir /home/oracle/opc/opc_wallet 
  -libDir /home/oracle/lib 
  -containerClass Tiering -container archive_container
Oracle Database Cloud Backup Module Install Tool, build MAIN_2017-09-12
Oracle Database Cloud Backup Module credentials are valid.
Backups would be sent to container archive_container.
Oracle Database Cloud Backup Module wallet created in directory /home/oracle/opc/opc_wallet.
Oracle Database Cloud Backup Module initialization file /orclhome/dbs/opcdb18c.ora created.
Downloading Oracle Database Cloud Backup Module Software Library from file opc_linux64.zip.
Download complete.

Example 2-5 JSON Document for Lifecycle Tiering Policy File

The following example shows a JSON document that contains the information required to define a Lifecycle Tiering Policy for an archive container. The Lifecycle Tiering Policy set using this JSON document excludes all XML files from the backup and moves backups to the Archive tier after 7 days.

{
   "archiveAfter":
   {
     "timeUnit":"DAYS",
     "time":7
   },
   "exclusions":[{"exclusionType":"REGEX","exclusionFilter":"\\.xml"}]
}

Note:

A value greater than 0 for archiveAfter is only supported in limited data centers.

Note:

You can run the installer and install the Oracle Database Cloud Backup Module for OCI Classic as many times as you like. Periodically perform the installation procedure to get the latest RMAN SBT library module, and also to update the password after you change it in Oracle Cloud.

Files Created When the Oracle Database Cloud Backup Module for OCI Classic is Installed

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

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

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 Oracle Database Cloud Backup Module for OCI Classic installer.

Example location:

ORACLE_HOME/lib

Operating system-specific SBT library that enables cloud backups and restores.

opcSID.ora

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

Default location on Linux and UNIX systems:

ORACLE_HOME/dbs

Default location on Windows systems:

ORACLE_HOME\database

Configuration file that contains the Oracle Database Backup Cloud Service container URL and credential wallet location, where SID is the system identifier of the Oracle database being backed up to Oracle Database Backup Cloud Service.

Note: Containers that are used by Recovery Manager (RMAN) cannot have server-side encryption enabled. Because RMAN backups are already encrypted at the client side, server-side encryption is not required.

cwallet.sso

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

Example location:

ORACLE_HOME/dbs/opc_wallet

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