Configuring Channels for Backup and Recovery Operations
Configure an RMAN channel to create a persistent configuration that affects backup, restore, recovery, and maintenance operations. Once the RMAN configuration is done, you can perform cloud backups and restores using any of the RMAN commands you usually use.
You can configure as many RMAN channels as you want. The location to which backups are stored is determined by the configuration that is currently in use. For example, if the current configuration is to Oracle Cloud using the Oracle Database Cloud Backup Module for OCI, then Oracle Cloud Infrastructure Object Storage is used for backup and restore operations. To back up to a different location, for example Oracle Cloud Infrastructure Classic Object Storage Classic, you just configure a channel that corresponds to Oracle Database Cloud Backup Module for OCI Classic.
For information about RMAN commands, see About RMAN Commands in the Oracle Database Backup and Recovery Reference.
Configuring RMAN Channels Using the SBT Library for OCI
RMAN uses the Oracle-supplied System Backup to Tape (SBT) media library for backups and restores with Oracle Cloud Infrastructure (OCI).
When you run the backup module installer, you can choose to download the SBT library and then configure the RMAN channel by specifying the absolute path name to the location where the downloaded SBT library is stored.
For Oracle Database 19c Release 27 (19.27) or later and Oracle AI Database 26ai
Release Update 23.8 or later, Oracle recommends that you use the database release
version specific native SBT library available in the
$ORACLE_HOME/lib directory after you install the database.
In this case, skip the -libDir parameter.
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 library alias name
oracle.oci. This creates a persistent configuration for RMAN
while performing backup and restores to Oracle Cloud.
See, Configuring RMAN to Use a Native SBT Media Library in the Backup and Recovery User's Guide to learn more about using native SBT libraries.
Example 3-1 Configuring RMAN to Back Up to Oracle Cloud Infrastructure
This example configures an RMAN channel, on a Linux or UNIX system, that uses the Oracle Database Cloud Backup Module for OCI for backup and restore operations with Oracle Cloud
Infrastructure. The SBT_LIBRARY parameter specifies the alias name (oracle.oci) of the native SBT library that enables RMAN backups and restores with OCI. opcora12.ora is the Backup Cloud Service configuration file that is created when you install the Backup Cloud Service module.
RMAN> CONFIGURE CHANNEL DEVICE TYPE sbt
PARMS='SBT_LIBRARY=oracle.oci'
SBT_PARMS=(OPC_PFILE=$ORACLE_HOME/dbs/opcora12.ora)';
On Windows systems, you must specify the ENV parameter. For example:
RMAN> CONFIGURE CHANNEL DEVICE TYPE sbt
PARMS='SBT_LIBRARY='oracle.oci'
ENV=(OPC_PFILE=C:\tmp\opcora12.ora)';
Example 3-2 Configuring RMAN to Back Up to Oracle Cloud Infrastructure Classic
On Linux and UNIX systems, the following command configures an RMAN channel that uses the Oracle Database Cloud Backup Module for OCI Classic SBT library and configuration file for backup to the cloud. The SBT_LIBRARY parameter specifies the alias name (oracle.oci) of the native SBT library that enables RMAN backups and restores with OCI. opct1.ora is the configuration file that is created when you install the backup module for OCI Classic.
For example:
RMAN> CONFIGURE CHANNEL DEVICE TYPE sbt
PARMS='SBT_LIBRARY=oracle.oci'
SBT_PARMS=(OPC_PFILE=/orclhome/dbs/opct1.ora)';
Note:
For Oracle Database 10g Release 2 (10.2), specify the
ENV parameter instead of the SBT_PARMS
parameter shown in the previous example. For example:
RMAN> CONFIGURE CHANNEL DEVICE TYPE sbt
PARMS='SBT_LIBRARY=/orclhome/lib/libopc.so,
ENV=(OPC_PFILE=/orclhome/dbs/opct1.ora)';
On Windows systems, you’ll need to specify the ENV
parameter. For example:
RMAN> CONFIGURE CHANNEL DEVICE TYPE sbt
PARMS='SBT_LIBRARY=C:\tmp\oraopc.dll,
ENV=(OPC_PFILE=C:\tmp\opct1.ora)';
If you’re on a Windows system and keep getting System or Media Management Loading errors when you try to perform a backup, your Windows environment could be missing C libraries needed by the backup module. Download the Redistributable Package for Visual Studio 2013 from https://www.microsoft.com/en-us/download/details.aspx?id=40784. Choose the 64-bit version and run the downloaded EXE file. This should resolve the problem.
Note:
In a Windows environment, install the oraopc.dll
library file in the ORACLE_HOME/bin directory, or pass
ORACLE_HOME as a parameter to the channel by using
sbt PARMS.
Example 3-3 Viewing the Configuration Settings
The SHOW ALL command displays the current RMAN
configuration. Use this command to confirm that you’ve configured RMAN to use Oracle Database Backup
Cloud Service as the backup destination:
RMAN> SHOW ALL;
When you use the Oracle Database Cloud Backup Module for OCI Classic, you’ll see an entry similar to this in your list of settings:
CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY='oracle.oci' SBT_PARMS=(OPC_PFILE=/orclhome/dbs/opct1.ora)';