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
-
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.
-
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.
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 |
---|---|---|
|
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 |
|
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 |
|
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 |
|
Tenancy OCID for the Oracle Cloud
Infrastructure account. See Required Keys
and OCIDs in Oracle Cloud Infrastructure
Documentation for information about obtaining the
|
Required |
|
User OCID for the Oracle Cloud Infrastructure account. |
Required |
|
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 |
|
Resource compartment ID for the Oracle Cloud Infrastructure account. The default value is the tenancy OCID if not specified. |
Optional |
|
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 |
|
Directory in which Oracle Cloud Infrastructure Object Storage credentials are stored. Suggested location on Linux and UNIX systems:
Suggested location on Windows systems:
If the specified wallet directory does not exist (for example, |
Required |
|
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:
Suggested location on Windows systems:
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
After installing the database, you can configure the RMAN SBT channel using the alias name 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 only if you want to download the latest library 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, you can optionally skip this parameter. Configure RMAN to use the native SBT library that corresponds to the backup module. |
|
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:
For information about supported operating systems, see Supported Databases and Operating Systems.. |
Optional |
|
Downloads only the SBT library. Use this parameter to update the library without making changes to the configuration file and the wallet. 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
After installing the database, you can configure the RMAN SBT channel using the alias name 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. |
Optional
If your target database version is 23.0 or higher, then you can optionally skip this parameter. Configure RMAN to use the native SBT library that corresponds to the backup module. |
|
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:
Default location on Windows systems:
The file name is |
Optional |
|
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 X509 certificates from the Java truststore. |
Optional |
|
HTTP proxy server host name |
Optional |
|
HTTP proxy server port number |
Optional |
|
HTTP proxy server user name, if needed. |
Optional |
|
HTTP proxy server password, if needed. |
Optional |
|
Indicates that parameters should be read from the specified file. For example, a file named
For this example, the following command installs the Oracle Database Cloud Backup Module for OCI using the parameters specified in the file:
|
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 To enable archiving of backups, the Object Storage service in the region must be granted permission to manage objects. 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:
|
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:
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
|
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.
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 |
---|---|---|
|
As specified for the Example location:
|
Operating system-specific SBT library that enables cloud backups and restores with the Oracle Cloud Infrastructure. |
|
As specified for the Default location on Linux and UNIX systems:
Default location on Windows systems:
|
Configuration file that contains theOracle Cloud
Infrastructure Object Storage bucket URL and credential wallet location, where |
|
As specified for the Example location:
|
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, |