Loading...

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.

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.

CommvaultInstance

The name of the Commvault instance.

DatabaseInstanceName

The name of the database instance.

BackupJobID

The Backup Job ID

PointInTime

The Point-in-Time. The syntax is MM-DD-YYYY hh:mm:ss.

BackupSetName

For DB2 only. The name of the backup set.

UNIX

Synopsis

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

  1. You must be a database instance user in the UNIX group of Commvault to run this utility.
  2. Log on to the CommServe computer.
  3. Go to the Commvault/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 CommvaultInstance -d DatabaseInstanceName -j BackupJobID OR -p PointInTime -b BackupSetName

Windows

Synopsis

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

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

    Get-Host

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

    Get-ExecutionPolicy

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

    Set-ExecutionPolicy Unrestricted

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

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

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

    Set-ExecutionPolicy Restricted

Examples

The following is an example to use the point-in-time option for a UNIX configuration.

The following parameters are used.

Parameter

Value

clientName

test_client

CommvaultInstance

TESTINST

DatabaseInstanceName

TESTINST

BackupJobID

Not used

PointInTime

07-01-2016 12:05:00

./Create_Db_Dir.sh -c test_client -i TESTINST -d TESTINST -p 07-01-2016 12:05:00

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.

Last modified: 6/13/2019 8:42:40 PM