Implementing a Dual Backup Strategy with Backups to Disk and Recovery Appliance (Doc ID 2154461.1)
RMAN - How to implement Dual Backup strategy (Doc ID 3003000.1)
Zero Data Loss Recovery Appliance Software - Version 12.1.0.1.0 and later
Linux x86-64
GOAL
Implement a dual backup strategy, with one set of backups written to disk and the other set written to the Recovery Appliance. Both backups use an incremental-forever backup strategy.
This procedure is only intended to be used for a short period of time while migrating backup operations to the Recovery Appliance.
SOLUTION
Before proceeding with this approach, all existing catalogs must be merged into the RA Catalog. This is required as all RMAN operations will connect to the RA Catalog. See 2.3 Migrating Backup Metadata to the Recovery Appliance Catalog
The solution involves running the three scripts detailed in the sections that follow.
Run the Incremental Merge script
The following script creates the local fast recovery area-based incremental merge backup:
set echo on
recover device type disk copy of database with tag FRA_INCR_MERGE from tag FRA_INCR_MERGE;
backup device type disk incremental level 1 for recover of copy with tag FRA_INCR_MERGE database;
Note that the tag must be the same for every backup being written to the fast recovery area on disk, but does not need to be FRA_INCR_MERGE explicitly.
Run the Recovery Appliance script
The following script creates the backups for the Recovery Appliance. These backups will be converted into virtual level 0 backups.
set echo on
backup device type sbt cumulative incremental level 1 for recover of tag RA_VB database;
Note the tag must be the same for every backup being written to the Recovery Appliance
Run the Archive Log Backup script
The following script creates the archive log backup sets which will reside on both the fast recovery area and the Recovery Appliance:
run {
backup device type disk archivelog all tag ARCHLOG not backed up;
}
run {
allocate channel c1 device type sbt FORMAT '%d_%U' PARMS "SBT_LIBRARY=<ORACLE_HOME>/lib/libra.so, ENV=(RA_WALLET='location=file:{ORACLE_HOME>/dbs/zdlra credential_alias=<credential-alias>')";
backup archivelog all tag ARCHLOG not backed up;
}
About Running the Scripts
You can run the first two scripts (“Incremental Merge” and “Recovery Appliance”) in any order before you run the last script.
The backup database commands in the first two scripts must include the database backup clause but NOT the archivelog backup clause.
You must run the third script (“Archive Log Backup”) as a single RMAN job.
You must run all of the scripts while connected to the Recovery Appliance catalog. The RMAN OS command should look like:
rman target / catalog /@<credential-alias> cmdfile=<filename>
APPLIES TO:
Oracle Database - Enterprise Edition - Version 19.18.0.0.0 and later
Information in this document applies to any platform.
GOAL
The document explains the details about how to implement the RMAN dual backup strategy.
SOLUTION
If CATALOG database in place, you must use the CATALOG database while taking all the backups.
Example given on two different backup types along with the archivelog backup.
1. INCREMENTAL Backup example,
The following script creates the backups for the Recovery Appliance. These backups will be converted into virtual level 0 backups.
run
{
set echo on
backup device type sbt cumulative incremental level 1 for recover of tag FRA_INCR_C database;
}
Note :Same TAG must be used for every backup being written to the FRA on disk. USe any name for the TAG.
2. INCREMENTAL BACKUP script Example,
The following script creates the local fast recovery area-based incremental merge backup:
run
{
set echo on
recover device type disk copy of database with tag FRA_INCR_MERGE from tag FRA_INCR_MERGE;
}
backup device type disk incremental level 1 for recover of copy with tag FRA_INCR_MERGE database;
Note :Same TAG must be used for every backup being written to the FRA on disk, but does not need to be REC_INC_MERGE explicitly.
3. ARCHIVELOG Backup:
Example archivelog backup on DISK and TAPE.
run
{
backup device type disk archivelog all tag ARC not backed up;
}
run
{
allocate channel c1 device type sbt FORMAT '%d_%U' PARMS "[SBT_LIB]=<ORACLE_HOME>/lib/libra.so, ENV=(RA_WALLET='location=file:{ORACLE_HOME>/dbs/zdlra credential_alias=<credential-alias>')";
backup archivelog all tag ARC not backed up;
}
IMPORTANT NOTE :
1. Backup scripts can be in any order.
2. Arhcivelog backup script can be run in any time , for example every 1 hour etc.
rman target / catalog /@<credential-alias> cmdfile=<filename>