Configuring Recovery Manager (RMAN) Settings

After you install the Oracle Database Cloud Backup Module for OCI or the Oracle Database Cloud Backup Module for OCI Classic, configure Recovery Manager (RMAN) to use Oracle Database Backup Cloud Service as the backup destination.

You’ll use the CONFIGURE command to create or change a persistent configuration affecting RMAN backup, restore, and maintenance. 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 this location is used for backup and restore operations. To back up to a different location, for example Oracle Cloud Infrastructure Classic, you just configure a channel that corresponds to Oracle Database Cloud Backup Module for OCI Classic.

For more information about the command, see CONFIGURE in Oracle Database Backup and Recovery Reference.

Configuring Autobackup

As a best practice, you should also configure RMAN to automatically back up the database control file and server parameter file. With a control file autobackup, RMAN can recover the database even if the current control file, recovery catalog, and server parameter file are inaccessible.

The autobackup feature is disabled by default. To enable autobackup, use the following command:

RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;

For information about configuring automatic archive for backups, see Configuring Automatic Archival to Oracle Cloud Infrastructure Classic.

For information about autobackups, see About RMAN Control File and Server Parameter File Autobackups in Oracle Database Backup and Recovery User's Guide.

For information about RMAN commands, see About RMAN Commands in Oracle Database Backup and Recovery Reference.

Example 2-6 Configuring RMAN to Back Up to Oracle Cloud Infrastructure

On Linux and UNIX systems, the following command configures an RMAN channel that uses the Oracle Database Cloud Backup Module for OCI SBT library for backup and restore operations to Oracle Cloud Infrastructure:

RMAN> CONFIGURE CHANNEL DEVICE TYPE sbt
      PARMS='SBT_LIBRARY=location-of-the-SBT-library-OCI-Backup-Module-for-OCI,
      SBT_PARMS=(OPC_PFILE=location-of-the-configuration file)';

For example:

RMAN> CONFIGURE CHANNEL DEVICE TYPE sbt
      PARMS='SBT_LIBRARY=/orclhome/lib/libopc.so,
      SBT_PARMS=(OPC_PFILE=/orclhome/dbs/opcora12.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\opcora12.ora)';

Example 2-7 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:

RMAN> CONFIGURE CHANNEL DEVICE TYPE sbt
      PARMS='SBT_LIBRARY=location-of-the-SBT-library-for-Database-Cloud-Backup-Module-for-OCIClassic,
      SBT_PARMS=(OPC_PFILE=location-of-the-configuration file)';

For example:

RMAN> CONFIGURE CHANNEL DEVICE TYPE sbt
      PARMS='SBT_LIBRARY=/orclhome/lib/libopc.so,
      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 execute the downloaded EXE file. This should resolve the problem.

You can configure as many RMAN channels as you want. Once the RMAN configuration is done, you can perform cloud backups and restores using any of the RMAN commands you usually use.

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.

Use the SHOW ALL command to confirm you’ve configured RMAN to use Oracle Database Backup Cloud Service as the backup destination:

RMAN> SHOW ALL;

You’ll see an entry similar to this in your list of settings:

CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS
'SBT_LIBRARY=/orclhome/lib/libopc.so,
SBT_PARMS=(OPC_PFILE=/orclhome/dbs/opct1.ora)';