BR*Tools Example: Restoring to a Different Windows Drive Configuration Using BRRECOVER

You can use this procedure to restore a backup to a Windows configuration that has different disk layout from the source.

This procedure includes an example for a Windows configuration and uses the BRRECOVER command.

In this example, the user has set “S:\oracle\RST” as the SAP HOME on the source host. The sapdata folders are staggered across several drives and have the same SAP HOME hierarchy defined inside them. The source SID is RST and the destination SID is JFK

The SAPDATA_HOME on the source is "S:\oracle\RST SAPDATA_HOME" and the target is "J:\oracle\data\JFK ."

Source Drives

Destination Drives

S:\oracle\RST\sapdata1

R:\oracle\RST\sapdata2

T:\oracle\RST\sapdata3

U:\oracle\RST\sapdata4

S:\oracle\RST\sapdata5

T:\oracle\RST\sapdata6

J:\oracle\data\JFK\sapdata1

M:\oracle\data\JFK\sapdata2

K:\oracle\data\JFK\sapdata3

L:\oracle\data\JFK\sapdata4

J:\oracle\data\JFK\sapdata5

K:\oracle\data\JFK\sapdata6

You can find the backup id in the BRBACKUP and BRARCHIVE files.

Example

The value after the #SAVED line is the backup id.

BR0280I BRBACKUP time stamp: 2016-03-07 13:17:10 
 #PFLOG.... /oraprdhome/app/ora11g/product/home1/PRD/sapbackup/besrellt.anf 
 #SAVED.... 10117894_7567 backupId
BR0280I BRARCHIVE time stamp: 2016-03-07 13:41:00 
 #PFLOG.... /oraprdhome/app/ora11g/product/home1/PRD/saparch/aesrenmf.cds 
 #SAVED.... 10117894_7568 backupId

Before You Begin

  1. On the source host, locate the detail file name and the summary file name of the data and log backups to be restored.

  2. On the destination host, create an instance for the database that you want to restore. For more information, see Creating an Instance.

  3. On the destination host, verify the SAPDATA_HOME directory structure exists. Create the directory structure if it does not exist.

  4. Copy or restore the init<SID>.ora and init<SID>.sap files from the host to the destination.

  5. On the destination host, edit the $ORACLE_HOME/dbs/init<SID>.utl file.

    For information on the supported parameters, see Supported SAP for Oracle Util File Parameters

    numstreams number_streams CvInstanceName Instance001 CvClientName destination_client_name srcCrossClient source_client_name srccrossdbname source_database_name destdbname destination_database_name*
  6. Optional: To have the CommCell Console authenticate the job, configure the parameters for CommCell Console third-party job authentication.

Procedure

  1. On the destination host command line, type the following.

    brrestore -d util_file -b2 BackupId -m $ORACLE_HOME/dbs/init<SID>.sap==path to $ORACLE_HOME/dbs folder on destination client
  2. On the destination host command line, type the following.

    brrestore -d util_file -b2 BackupId -m $ORACLE_HOME/dbs/initSID.ora==path to $ORACLE_HOME/dbs folder on destination client
  3. On the destination host, rename the file init<SOURCE_SID>.sap to init<DESTINATION_SID>.sap. On the destination host command line, type the following:

    mv init<SOURCE_SID>.sap to initDESTINATION_SID.sap
  4. On the destination host, rename the file init<SOURCE_SID>.ora to init<DESTINATION_SID>.ora. On the destination host command line, type the following:

    mv init<SOURCE_SID>.ora to initDESTINATION_SID.ora
  5. On the destination host, edit the init<SID>.sap file and make the following changes.

    backup_root_dir = path to $SAPDATA_HOME/sapbackup folder on destination client 
     stage_root_dir = path to $SAPDATA_HOME/sapbackup folder on destination client
     compress_cmd =path to $SAPDATA_HOME/sapbackup folder on destination client/mkszip -c $ >"
     uncompress_cmd = path to $SAPDATA_HOME/sapbackup folder on destination client /uncompress -c $ >"
     compress_dir = path to $SAPDATA_HOME/sapreorg folder on destination client
     archive_copy_dir = path to $SAPDATA_HOME/sapbackup folder on destination client
     archive_stage_dir =path to $SAPDATA_HOME/sapbackup folder on destination client
  6. On the destination host, edit the init<SID>.ora file and make the following changes.

    control_files = path to control file mirror locations on destination client 
     background_dump_dest = path to $SAPDATA_HOME/saptrace/background on destination client
     user_dump_dest = path to $SAPDATA_HOME/saptrace/usertrace on destination client 
     log_archive_dest = path to $SAPDATA_HOME/saparch on destination client 
     db_name = DESTINATION_SID
  7. On the destination host, create an SPFILE from the PFILE. On the command line, type the following:

    SQL> shutdown immediate; 
     SQL> startup nomount; 
     SQL> create spfile from pfile;
    
  8. Copy or restore the BRBACKUP summary file from the source to the destination client. On the destination host command line, type the following:

    brrestore -d uti_file -b2 backupId -m path to $SAPDATA_HOME/sapbackup/back/<SOURCE_SID>.log on source client==path to $SAPDATA_HOME/sapbackup on destination client
  9. Copy or restore the BRARCHIVE summary file from the source to the destination client. On the destination host command line, type the following:

    brrestore -d uti_file -b2 backupId -m path to $SAPDATA_HOME/saparch/arch/<SOURCE_SID>.log on source client==path to $SAPDATA_HOME/saparch on destination client
  10. On the destination host, rename the file back<SOURCE_SID>.log file to back<DESTINATION_SID>.log . On the destination host command line, type the following:

    mv back<SOURCE_SID>.log to back<DESTINATION_SID>.log
  11. On the destination host, rename the file arch<SOURCE_SID>.log to arch<DESTINATION_SID>.log. On the destination host command line, type the following:

    mv arch<SOURCE_SID>.log to arch<DESTINATION_SID>.log
  12. Copy or restore the BRBACKUP detail file from the source client to the destination client. On the command line, type the following:

    brrestore -d uti_file -b2 backupId -m path to $SAPDATA_HOME/sapbackup/BRBACKUP_DETAIL file on source client==path to $SAPDATA_HOME/sapbackup on destination client
  13. Copy or restore the BRARCHIVE detail file from the source client to the destination client. On the command line, type the following:

    brrestore -d uti_file -b2 backupId -m path to $SAPDATA_HOME/saparch/BRARCHIVE_DETAIL on source client==path to $SAPDATA_HOME/saparch on destination client
    brrestore -d utifile -b2 backupId -m path to $SAPDATA_HOME/saparch/BRARCHIVE_DETAIL on source client==path to $SAPDATA_HOME/saparch on destination client
  14. On the destination host, recover the BRBACKUP detail file. On the command line, type the following command, substituting the device_type, BRBACKUP_detail_file, device_type and SID variables.

    Note:You must specify the full path for the BRBACKUP_detail_file.

    brrecover -d util_file -t dbpit -b last -f TRD -seq last -c force -map S:=J:,R:=M:,T:=K:,U:=L:
×

Loading...