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.
For details on Oracle Disaster Recovery, see Full System Recovery: Oracle.
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
-
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.
-
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
-
The Create_Db_Dir.ps1 script is in the Commvault directory.
-
Run the Windows powershell from the Commvault_installation directory.
-
Open the PowerShell prompt and verify the version is 2.0 or above.
Get-Host
-
Verify the Execution Policy for PowerShell is 'Unrestricted'. At the PowerShell prompt, type the following command.
Get-ExecutionPolicy
-
Set the Execution Policy to Unrestricted. At the PowerShell prompt, type the following command.
Set-ExecutionPolicy Unrestricted
-
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
-
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
-
Copy the init file from the source to the restore host.
-
When you do not use the recovery catalog, restore the SP file or control file, and set the database identifier.