Skip to main content

Oracle RMAN

CxLink Backup can be executed as an RMAN plugin by configuring your RMAN environment with the provided library under /opt/emory/lib directory.

Once RMAN environment is properly configured, you can execute backup, restore and archivelog operations using RMAN.

Topics


Configure RMAN environment

Before you can start using CxLink Backup For Oracle RMAN, you will need to ensure that the following configuration is applied to your RMAN environment.

As SBT channel devices are used to perform backup operations, you need to configure them to load corresponding CxLink Backup For RMAN library /opt/emory/lib/libemoryora.so.


SBT channels

Minimum configuration for your SBT channels is to specify where CxLink Backup For RMAN library is by executing configure command from RMAN client:


_10
CONFIGURE CHANNEL DEVICE TYPE sbt PARMS='SBT_LIBRARY=/opt/emory/lib/libemoryora.so';

And, for your convenience, specify SBT device as the default one for backups:


_10
CONFIGURE DEFAULT DEVICE TYPE TO sbt;

You can configure other parameters like parallelism, autobackup etc by following Oracle documentation from Oracle Help Center.

Parallelism

CxLink Backup for RMAN supports parallelism by using multiple sbt channels.

You can allocate them manually:


_11
RUN {
_11
ALLOCATE CHANNEL c1 DEVICE TYPE sbt PARMS 'SBT_LIBRARY=/opt/emory/lib/libemoryora.so';
_11
ALLOCATE CHANNEL c2 DEVICE type sbt parms 'SBT_LIBRARY=/opt/emory/lib/libemoryora.so';
_11
ALLOCATE CHANNEL c3 DEVICE type sbt parms 'SBT_LIBRARY=/opt/emory/lib/libemoryora.so';
_11
ALLOCATE CHANNEL c4 DEVICE type sbt parms 'SBT_LIBRARY=/opt/emory/lib/libemoryora.so';
_11
BACKUP FULL DATABASE TAG FULL_ONLINE_BACKUP;
_11
RELEASE CHANNEL c1;
_11
RELEASE CHANNEL c2;
_11
RELEASE CHANNEL c3;
_11
RELEASE CHANNEL c4;
_11
}

Or you can specify PARALLELISM parameter under channel configuration to have automatic channel allocation:


_10
CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 4 BACKUP TYPE TO BACKUPSET;

Backup Lifecycle

Expiration dates are CxLink Backup managed.

You can configure lifecycle as explained in Backup Lifecycle & Housekeeping section.

Backups will be created with the corresponding calculated expiration date and RMAN will expire them at that date.

Other configurations

You can also configure compression, encryption and many other interesting RMAN parameters, all of them compatible with CxLink Backup For RMAN solution.

More information on Oracle Help Center pages.


Backup your database

Once CxLink Backup agent is installed and RMAN parameters configured, you can initiate backup using RMAN:


_10
BACKUP FULL DATABASE TAG FULL_ONLINE_01;

In the example a full online backup is started and labeled as FULL_ONLINE_01 but you can follow backup related documentation from Oracle Help Center.

Oracle Help Center

Restore your database

To restore your database you can use any of the backup images from RMAN catalog. List command will show you available images:


_16
RMAN> list backup summary;
_16
_16
List of Backups
_16
===============
_16
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
_16
------- -- -- - ----------- --------------- ------- ------- ---------- ---
_16
144 B F A SBT_TAPE 14-NOV-23 1 1 NO FULL_ONLINE_01
_16
145 B F A SBT_TAPE 14-NOV-23 1 1 NO FULL_ONLINE_01
_16
146 B F X SBT_TAPE 14-NOV-23 1 1 NO FULL_ONLINE_01
_16
147 B F A SBT_TAPE 14-NOV-23 1 1 NO FULL_ONLINE_01
_16
148 B F A SBT_TAPE 14-NOV-23 1 1 NO FULL_ONLINE_01
_16
149 B F A SBT_TAPE 14-NOV-23 1 1 NO FULL_ONLINE_01
_16
150 B F A SBT_TAPE 14-NOV-23 1 1 NO FULL_ONLINE_01
_16
151 B F A SBT_TAPE 14-NOV-23 1 1 NO FULL_ONLINE_01
_16
152 B F A SBT_TAPE 14-NOV-23 1 1 NO FULL_ONLINE_01
_16
153 B F A SBT_TAPE 14-NOV-23 1 1 NO FULL_ONLINE_01

For example, you can restore full backup database labeled as FULL_ONLINE_01


_10
RESTORE DATABASE FROM TAG FULL_ONLINE_01;

And then recover:


_10
RECOVER DATABASE;

This is a very basic example; you can recover to a point-in-time or even to a certain log sequence number. Read Oracle documentation for detailed information.

Oracle Help Center

General recommendations

Maintain an external RMAN recovery catalog

As Oracle recommends, a recovery catalog in an external Oracle database should be maintained. This will ensure a quick database recovery in case of disaster.

Use Disaster Recovery storage provider only if necessary

You can configure a Disaster Recovery storage provider; this will download CxLink Catalog from configured location and will use it in case of restore.

Use this feature ONLY to restore from a recovery location (i.e. in case of a total lost of your database). As soon as you recovered the database just remove the configuration. RMAN catalog maintenance won't be properly working due to possible differences between RMAN catalog and CxLink Backup catalog (i.e. removing backups from RMAN using delete will fail).

Where are your backups stored?

Your backups will be stored in the target bucket following these formatting:

<DB>/<year>/<month>/<day>/<RMAN_backup_file_name>

All backup files from the same backup will have the exact same suffix. These can help you to identify the objects of a specific backup.

Example: LNK/2023/11/15/bfgwodzu_1_1