Configuring Upstream and Downstream Recovery Appliance

This task creates host specific files for backups, loads the scripts on their respective hosts, and verifies the credentials.

  1. On a host of the upstream Recovery Appliance, create the backup_database_rahadr1.rman text file with the following content.
    {
    allocate channel rahadr1_sbt_1 device type sbt
      format '%d_%U'
      PARMS="SBT_LIBRARY=/u01/app/oracle/product/12.2.0.1/dbhome_1/lib/libra.so,
      ENV=(RA_WALLET='location=file:/u01/app/oracle/product/12.2.0.1/dbhome_1/dbs/zdlra
      credential_alias=dr_rahadr1')";
    
    allocate channel rahadr1_sbt_2 device type sbt
      format '%d_%U'
      PARMS="SBT_LIBRARY=/u01/app/oracle/product/12.2.0.1/dbhome_1/lib/libra.so,
      ENV=(RA_WALLET='location=file:/u01/app/oracle/product/12.2.0.1/dbhome_1/dbs/zdlra
      credential_alias=dr_rahadr1')";
    
    backup
      tag '&1'
      cumulative incremental level 1
      filesperset 1
      section size 64g
      database
        plus archivelog
          not backed up
          filesperset 32
          delete input;
    }
  2. On a host of the downstream Recovery Appliance, create the backup_database_rahadr2.rman text file with the following content.
    {
    allocate channel rahadr2_sbt_1 device type sbt
      format '%d_%U'
      PARMS="SBT_LIBRARY=/u01/app/oracle/product/12.2.0.1/dbhome_1/lib/libra.so,
      ENV=(RA_WALLET='location=file:/u01/app/oracle/product/12.2.0.1/dbhome_1/dbs/zdlra
      credential_alias=dr_rahadr2')";
    
    allocate channel rahadr1_sbt_2 device type sbt
      format '%d_%U'
      PARMS="SBT_LIBRARY=/u01/app/oracle/product/12.2.0.1/dbhome_1/lib/libra.so,
      ENV=(RA_WALLET='location=file:/u01/app/oracle/product/12.2.0.1/dbhome_1/dbs/zdlra
      credential_alias=dr_rahadr2')";
    
    backup
      tag '&1'
      cumulative incremental level 1
      filesperset 1
      section size 64g
      database
        plus archivelog
          not backed up
          filesperset 32
          delete input;
    }
  3. Ensure the script on RAHADR1 does not exist by trying to delete it first. Then load the HADR1 script into the RAHADR1 Recovery Appliance.
    $ rman target / catalog /@dr_rahadr1
    
    RMAN> delete script backup_database;
    
    RMAN> create script backup_database from file
    '/home/oracle/backup_database_rahadr1.rman';
  4. Ensure the script on RAHADR2 does not exist by trying to delete it first. Then load the HADR2 script into the RAHADR2 Recovery Appliance.
    $ rman target / catalog /@dr_rahadr2
    
    RMAN> delete script backup_database;
    
    RMAN> create script backup_database from file
    '/home/oracle/backup_database_rahadr2.rman';
  5. Verify credentials have access to the database.
    $ rman target / catalog /@dr_rahadr
    
    RMAN> print script backup_database;
    
    printing stored script: backup_database
    {
    allocate channel rahadr1_sbt_1 device type sbt
      format '%d_%U'
      PARMS="SBT_LIBRARY=/u01/app/oracle/product/12.2.0.1/dbhome_1/lib/libra.so,
      ENV=(RA_WALLET='location=file:/u01/app/oracle/product/12.2.0.1/dbhome_1/dbs/zdlra
      credential_alias=dr_rahadr1')";
    
    allocate channel rahadr1_sbt_2 device type sbt
      format '%d_%U'
      PARMS="SBT_LIBRARY=/u01/app/oracle/product/12.2.0.1/dbhome_1/lib/libra.so,
      ENV=(RA_WALLET='location=file:/u01/app/oracle/product/12.2.0.1/dbhome_1/dbs/zdlra
      credential_alias=dr_rahadr1')";
    
    backup
      tag '&1'
      cumulative incremental level 1
      filesperset 1
      section size 64g
      database
        plus archivelog
          not backed up
          filesperset 32
          delete input;
    }