Creating Directories on the Target for Disaster Recovery and Cross-Machine Restores

You must create the target directories on the destination host for a cross-machine restore or disaster recovery, when they do not exist.

You can run the Create_Db_Dir.ps1 or Create_Db_Dir.sh scripts on either a Windows or UNIX configuration to create the directory structure. If you run the script when the directory exists, the directory structure is NOT overwritten.

Note: These scripts do not support table level or duplicate database restores. You can only use the scripts to restore a database to the same Oracle instance name, on the same or a different server.

Further details on Oracle Disaster Recovery can be found here.

Procedure

Parameters

The following table defines the parameters for both scripts.

If you do not specify the BackupJobID or PointInTime parameters, the current time is used for the Point-in-Time.

Parameter Description
clientName Specifies the name of the client as displayed in the CommCell Browser.
SimpanaInstance The name of the SnapProtect instance.
DatabaseInstanceName The name of the database instance.
BackupJobID The Backup Job ID
PointInTime The Point-in-Time
BackupSetName For DB2 only. The name of the backup set.

UNIX

Synopsis

Create_Db_Dir.sh -c clientName -i SimpanaInstance -d DatabaseInstanceName -j BackupJobID OR -p PointInTime -b BackupSetName

  1. You must be a database instance user in the UNIX group of SnapProtect to run this utility.
  2. Log on to the CommServe computer.
  3. Go to the SnapProtect/Base directory to locate the Create_Db_Dir.sh utility.
  4. On the command line, type the following command.

    Create_Db_Dir.sh -c clientName -i SimpanaInstance -d DatabaseInstanceName -j BackupJobID OR -p PointInTime -b BackupSetName

Windows

Synopsis

Create_Db_Dir.ps1 -c clientName -i SimpanaInstance -d DatabaseInstanceName -j BackupJobID OR -p PointInTime -b BackupSetName

  1. The Create_Db_Dir.ps1 script is in the SnapProtect directory.
  2. Run the Windows powershell from the SnapProtect_installation directory.
  3. Open the PowerShell prompt and verify the version is 2.0 or above.

    powershell Get-Host

  4. Verify the Execution Policy for PowerShell is 'Unrestricted'. At the PowerShell prompt, type the following command.

    powershell Get-ExecutionPolicy

  5. Set the Execution Policy to Unrestricted. At the PowerShell prompt, type the following command.

    powershell Set-ExecutionPolicy Unrestricted

  6. At the PowerShell prompt, type the following command.

    Create_Db_Dir.ps1 -c clientName -i SimpanaInstance -d DatabaseInstanceName -j BackupJobID OR -p PointInTime -b BackupSetName

  7. At the PowerShell prompt, disable the powerShell script execution on the system:

    powershell Set-ExecutionPolicy Restricted

What To Do Next

  1. Copy the init file from the source to the restore host.
  2. When you do not use the recovery catalog, restore the SP file or control file, and set the database identifier.