Friday, May 14, 2021

Configure Oracle RMAN Backups using Media Manager

In order to backup and restore from sequential media such as tape you must integrate a media manager with your Oracle database. Note that media manager is not an Oracle product and must be obtained and licensed fom a third-party vendor.

1. Prerequisites for a Media Manager 

Before using any media manager with your Oracle database you need to install the required plug in and make sure that RMAN can communicate with it. For Instructions, refer vendor documentation. The third-party media management module contains the media management library that the Oracle database loads and uses when accessing the media manager..

2. Locating the Media Management Library

User should use SBT_LIBRARY parameter when allocating or configuring channels for RMAN to use to communicate with a media manager, SBT_LIBRARY parameter to provide the path to the media management library and this library will be loaded during the communication with media manager

On UNIX, the default library location is $ORACLE_HOME/lib/libobk.so, with the extension name varying according to platform: .so, .sl, .a, and so forth.

On Windows, the default library location is %ORACLE_HOME%\bin\orasbt.dll.

If the database is unable to locate a media library specified by the SBT_LIBRARY parameter RMAN issues an ORA-27211 error and exits. Note that there is no default media management library file as part of standard database installation.

When channel allocation fails, the database writes a trace file to the USER_DUMP_DEST directory.

For ex:- SBT Initialize failed for /oracle/home/lib/libobk.so
 
3. Media Manager Library Integration

You need to define the media manager library , Media manager server, storage system, configure user…etc to configure. The PARMS parameter will be used to ALLOCATE or CONFIGURE CHANNEL and FORMAT and BACKUP commands will be used to backup. To limit backup piece sizes, use the parameter MAXPIECESIZE,

Example 1:-
RUN {
ALLOCATE CHANNEL C1 TYPE SBT_TAPE PARMS='SBT_LIBRARY=<media manager > lib/libddobk.so'; ENV=(STORAGE_UNIT=<storage_unit>,BACKUP_HOST=<backup host>)'
}

Example 2: -
RUN {
ALLOCATE CHANNEL C1 TYPE SBT_TAPE PARMS='SBT_LIBRARY=<media manager > lib/libddobk.so'; ENV=(NSR_SERVER=<Media Manager server>,NSR_CLIENT=<oracle Client> ,NSR_GROUP=<Tapes>)’
}

Note that the parameters will vary based upon Media Manager vendor

If the media manager could not be located user will receive below error message
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of allocate command on c1 channel at 12/10/2020 10:11:20
ORA-19554: error allocating device, device type: SBT_TAPE, device name:
ORA-27211: Failed to load Media Management Library
Additional information: 25

Once you configure the channel, you can run below commands to backup the database files.
To check SBT configuration
RMAN> SHOW CHANNEL FOR DEVICE TYPE SBT_TAPE;
To backup the control file to SBT_TAPE
RMAN> BACKUP DEVICE TYPE SBT_TAPE CURRENT CONTROLFILE;
Backup archived redo log backup to tape
RMAN> CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE

You can configure the default device to SBT_TAPE and FORMAT so that RMAN sends all backups to the media manager in specified format

RMAN> CONFIGURE DEFAULT DEVICE TYPE TO SBT_TAPE;
RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT = '?/bkup_%U';

Once you configuring the default device all the backups should go to media manager:

RMAN> BACKUP CURRENT CONTROLFILE;
RMAN> BACKUP DATABASE;

Please see the below link to configure Oracle Backups using DDBoost Media Manager
Oracle RMAN backup using DataDomain-Boost

Thanks & Regards

1 comment:

  1. Packers and Movers Ahmedabad - We Provide ***Best Service Providers, Safe, Reliable, Affordable, Trusted ###Movers and Packers in Ahmedabad List, Household Shifting, Office Relocation: Choose Top Verified Packers and Movers Ahmedabad Compare ✔✔✔Shifting Service Chrages, Price Quotation, Rate List Charts and Save Money and Time @ Packers and Movers Ahmedabad

    ReplyDelete