The db2util.sh utility supports the following options and input file parameters.
Query Options
The following options are available when you want to query Commvault for backup information.
|
Option |
Description |
|---|---|
|
-q |
Query operation Valid values are:
|
|
-c |
The CommCell pseudo-client name. For a cluster setup, this client name is virtual machine client name. |
|
-s |
The DB2 instance name |
|
-d |
The DB2 database name |
|
-i |
The Commvault instance name. If you do not specify a Commvault instance, then Instance001 is used. |
|
-o |
This is optional. The target database name. If a target database name is not provided, the source database name is used. |
|
-r |
Retrieves the log files under the db2 retrieve path. |
|
-f |
The start date and time to include in the query. Enclose the date and time in single quotation marks and use the following format: MM-DD-YYYY hh:mm:ss For example, '01-11-2019 10:00:00' Use the -f option with the -t option. Note
|
|
-t |
The end date and time to include in the query. Enclose the date and time in single quotation marks and use the following format: MM-DD-YYYY hh:mm:ss For example, '04-11-2019 10:00:00' Use the -t option with the -f option. |
|
-a |
Name of the file containing the script input parameters |
|
-n DPF |
Use this when you have a DB2 DPF configuration. |
|
-h |
Prints usage information |
Restore Options
The following options are available when you want to restore the data.
|
Option |
Description |
Additional Information |
|---|---|---|
|
-r |
Restore operation Valid values are:
|
|
|
-d |
Name of database to be restored. |
|
|
-j |
Backup job ID for the data or log to be restored. |
The IntelliSnap (non-traditional DB2 backup image) is not supported when you provide the job ID. All job IDs must be for traditional DB2 jobs. |
|
-f |
Start Log Sequence number |
If you use -r JOB, the -f and -t options for the range of DB2 logs is ignored. |
|
-t |
End Log sequence number |
|
|
-p |
Directory to which backup job data has to be restored, valid for '-r JOB' case. |
|
|
-s |
The source DB2 instance name. |
|
|
-c |
The source CommCell pseudo-client name. |
|
|
-n DPF |
Use this when you have a DB2 DPF configuration. |
|
|
-i |
The Commvault instance name. If you do not specify a Commvault Instance, then Instance001 is used. |
|
|
-a |
Name of the file containing the script input parameters |
|
|
-k |
This parameter is for log restores. The DB2 DPF target client. |
|
|
-l |
The target DB2 instance name. |
-
Use this query on a cross-machine restore to query and restore the backup image to the location. You must install the DB2 application and DB2 Agent on the destination. The DB2 version must be the same or higher.
-
Commvault supports restoring the backup image to disk using db2util.sh for a single job ID only. The last job ID in one cycle will only be considered. Multiple job IDs (one cycle) in command are ignored.
-
Commvault supports restoring the backup image to disk using db2util.sh if the backup has multiple streams. The backup job is restored to disk with multiple images which have the same timestamps as shown in the following example:
TESTDB.0.DB2INST7.NODE0000.CATN0000.20130719155240.001 TESTDB.0.DB2INST7.NODE0000.CATN0000.20130719155240.002
Input File Parameters
You can specify the following parameters in an input file.
|
Parameter |
Description |
|---|---|
|
CVSRCCLIENTNAME |
Source client name |
|
CVSRCDB2INSTANCENAME |
Source DB2 instance name |
|
OPERATION |
Specify an operation QA/QL/QD(QUERY) or RL/RJ(RESTORE) to be performed on database |
|
RESTOREDIR |
Directory where the backup job data is restored. This option is valid when OPERATION is set to RJ. |
|
JOBID |
Backup job ID for the data to be restored |
|
DBNAME |
Database name |
|
APPLICATION DPF |
Only for DPF |
|
FROMLSN |
The from log number |
|
TOLSN |
The to log number |