RMAN - How to implement Dual Backup strategy (Doc ID 3003000.1)
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.
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.
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.
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
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=
backup archivelog all tag ARCHLOG not backed up;
}
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 /@
Oracle Database - Enterprise Edition - Version 19.18.0.0.0 and later
Information in this document applies to any platform.
The document explains the details about how to implement the RMAN dual backup strategy.
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.
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.
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.
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]=
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 /@