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
-
You must be a database instance user in the UNIX group of Commvault to run this utility.
-
Go to the <Commvault>/Base directory to locate the Create_Db_Dir.sh utility.
-
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
-
The script Create_Db_Dir.ps1 is located under Commvault location.
-
The Windows powershell needs to run it from Commvault_installation\Create_Db_Dir.ps1.
-
Open the PowerShell prompt and verify the version is 2.0 or above.
powershell Get-Host -
Verify the Execution Policy for PowerShell is 'Unrestricted'.
powershell Get-ExecutionPolicyIf needed, set the Execution Policy to 'Unrestricted'
powershell Set-ExecutionPolicy Unrestricted -
Execute the script:
powershell.\Commvault_installation\Create_Db_dir.sh -c $[clientName] -i $[CommvaultInstance] -d $[DatabaseInstanceName] -j $[BackupJobID] OR -p $[PointInTime] -b $[BackupSetName] -
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]