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

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

This procedure is supported for the latest backup jobs. You cannot use a point-in-time backup job for this procedure.

Before You Begin

  1. Perform a full backup.

    Set the device type (-d) option to util_file and the type (-t) option to offline.

  2. On the source, use sqlplus to note the parent directory structure. On the sqlplus command line, type the following command:

    SQL> select name from v$datafile;

    Example

    In the following example, K:\ORACLE\PSM is the SAP HOME on the host computer and the sapdata folders are located on multiple drives.

    Each drive has the same defined SAP HOME hierarchy.

    The source SID is PSM and the destination SID is SRM.

    Full Output

    Source Drives

    J:\ORACLE\PSM\SAPDATA1 K:\ORACLE\PSM\SAPDATA2 R:\ORACLE\PSM\SAPDATA3 S:\ORACLE\PSM\SAPDATA4 T:\ORACLE\PSM\SAPDATA5 U:\ORACLE\PSM\SAPDATA6

    Destination Drives

    G:\ORACLE\SRM\SAPDATA1 
    I:\ORACLE\SRM\SAPDATA2 
    J:\ORACLE\SRM\SAPDATA3 
    J:\ORACLE\SRM\SAPDATA4 
    J:\ORACLE\SRM\SAPDATA5 
    J:\ORACLE\SRM\SAPDATA6
  3. 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.

    In the following example, the restore is performed by using copy precedence 2.

    CvClientName 
     Client2 
     CvInstanceName 
     Instance001 
     Srccrossclient 
     Client1 
     srccrossdbname 
     PSM 
     Cv_restCopyPrec 
     2
  4. Create a destination instance in the source CommCell Console.

Procedure

  1. Restore the SAP data summary file. You can get the value of the SAP backup ID from the BRBACKUP and BRARCHIVE detail files. On the command line, type the following:

    brrestore - d util_file -b2 <backupID> -m <source path/data_summary_file>=<target_directory> -c -u / -r <source_parameter_file>

    Example

    brrestore -d util_file -b2 <backupID> -m K:\oracle\PSM\sapbackup\backPSM.log=H:\oracle\SRM\sapbackup -c -u / -r H:\oracle\SRM\11203\database\initSRM.utl
  2. Rename the <SID>arch on the destination.

    Using the example from the previous step, rename 'PSMarch' to 'SRMarch'.

  3. Restore the SAP data detail file. You can get the value of the SAP backup ID from the BRBACKUP and BRARCHIVE detail files. On the command line, type the following:

    brrestore -d util_file -b2 <backupID> -m <source path/data_detail_file>=<target_directory> -c -u / -r <source_parameter_file>

    Example

    brrestore -d util_file -b2 <backupID> -m K:\oracle\PSM\saparch\archPSM.log=H:\oracle\SRM\saparch -c -u / -r H:\oracle\SRM\11203\database\initSRM.utl
  4. Restore the SAP log summary file. You can get the value of the SAP backup ID from the BRBACKUP and BRARCHIVE detail files. On the command line, type the following:

    brrestore -d util_file -b2 <backupID> <source path/log_summary_file>=<target_directory> -c -u / -r <source_parameter_file>

    Example

    brrestore -d util_file -b2 <backupID> -m K:\oracle\PSM\saparch\archPSM.log=H:\oracle\SRM\saparch -c -u / -r H:\oracle\SRM\11203\database\initSRM.utl
  5. Rename the <SID>arch on the destination.

    Using the example from the previous step, rename 'PSMarch' to 'SRMarch'.

  6. Restore the SAP log detail file. You can get the value of the SAP backup ID from the BRBACKUP and BRARCHIVE detail files. On the command line, type the following:

    brrestore -d util_file -b2 <backupID> -m <source path/log_detail_file>=<target_directory> -c -u / -r <source_parameter_file>

    Example

    brrestore -d util_file -b2 <backupID> -m K:\oracle\PSM\saparch\aesbiixs.sve=H:\oracle\SRM\saparch -c -u / -r H:\oracle\SRM\11203\database\initSRM.utl
  7. Restore all the data detail files from the source host to the corresponding directory on the destination. On the command line, type the following command.

    brrestore -d util_file -b <data_detail_file> -m <source drive 1>=<target drive 1>,<source drive 2>=<target drive 2> -c -u / -r <source_parameter_file>

    Example

    This restores all the data files that are in the J:\ORACLE\PSM\SAPDATA1 to the G:\ORACLE\SRM\SAPDATA1 on the destination machine. You can type this on one line.

    brrestore -d util_file -b besbiili.anf -m 
     J:\ORACLE\PSM\SAPDATA1=G:\ORACLE\SRM\SAPDATA1, 
     K:\ORACLE\PSM\SAPDATA2=I:\ORACLE\SRM\SAPDATA2,
    R:\ORACLE\PSM\SAPDATA3=J:\ORACLE\SRM\SAPDATA3,
     S:\ORACLE\PSM\SAPDATA4=J:\ORACLE\SRM\SAPDATA4, 
    T:\ORACLE\PSM\SAPDATA5=J:\ORACLE\SRM\SAPDATA5,
     U:\ORACLE\PSM\SAPDATA6=J:\ORACLE\SRM\SAPDATA6 -c -u / -r H:\ORACLE\SRM\11203\DATABASE\INITSRM.UTL
  8. Restore all the logs. On the command line, type the following command.

    brrestore -d util_file -a <log_seq_start-log_seq_start>=<target drive 1> -r <source_parameter_file>

    Example

    This restores logs 1-20 to the destination directory.

    brrestore -d util_file -a 1-20==F:\oracle\SRM\oraarch -c -u / -r H:\oracle\SRM\11203\database\initSRM.utl
  9. Restore the control file.

    Note

    To avoid database inconsistency on the destination machine, restore the control file to one of the mirror locations and copy it from the restore location to rest of the control file locations. You can get the control file mirror locations in the init<SID>.ora file on the destination machine. You can get the value of the SAP backup ID from the BRBACKUP and BRARCHIVE detail files.

    On the command line, type the following command.

    brrestore -d util_file –b2 <backupID> -m <source path/control File>=<target_directory> -c -u / -r <source_parameter_file>

    Example

    This restores logs 1-20 to the destination directory.

    brrestore -d util_file –b2 <backupID> -m K:\oracle\PSM\sapbackup\CNTRLPSM.DBF=H:\oracle\SRM\sapdata1\cntrl -c -u / -r H:\oracle\SRM\11203\database\initSRM.utl
  10. Copy the restored control file to the mirror locations.

  11. On destination machine set the Oracle database state to mount mode so that you can back up the control file to trace:

    SQL> shut immediate 
     SQL> startup mount 
     SQL> alter database backup controlfile to trace as '<control_file_location>’;
  12. Edit the SQL trace file and replace the source paths with the destination file path and mirror locations. As this is a redirected restore to different host, you must reset the logs.

  13. Rename the restored control files to create the control files on the destination host. Create a new control file on the destination by using the edited SQL trace file.

  14. Run sqlplus recovery by using the backup control file.

Loading...