Loading...

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

In the event of a disaster, the recovery to the new target database may include creating the data directories on the target (destination) host if they do not exist. A similar situation may occur when performing a cross-machine restore.

The Create_Db_dir.ps1 or Create_Db_Dir.sh scripts are run on either a Windows or UNIX configuration and create the directory structure needed for a disaster recovery or cross-machine restore scripts.

If you do not use 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 (e.g., client1).

CommvaultInstance

The name of the Commvault 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

  1. You must be a database instance user in the UNIX group of Commvault to run this utility.
  2. Log onto the CommServe.
  3. Go to the <Commvault>/Base directory to locate the Create_Db_Dir.sh utility.
  4. Run the Create_Db_Dir.sh utility to create the directory

Usage

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

Windows

  1. The script Create_Db_Dir.ps1 is located under Commvault location.
  2. The Windows powershell needs to run it from Commvault_installation\Create_Db_Dir.ps1.
  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'.

    powershell Get-ExecutionPolicy

    If needed, set the Execution Policy to 'Unrestricted'

    powershell Set-ExecutionPolicy Unrestricted

  5. Execute the script:

    powershell.\Commvault_installation\Create_Db_dir.sh -c <clientName> -i <CommvaultInstance> -d <DatabaseInstanceName> -j <BackupJobID> OR -p <PointInTime> -b <BackupSetName>

  6. Disable the PowerShell script execution on the system:

    powershell Set-ExecutionPolicy Restricted

Usage

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

Last modified: 5/1/2018 7:35:59 PM