Command Line Interface - Configuration - DB2 iDataAgent

Table of Contents

Log On to the CommServe

To run command line operations, you must first login to the CommServe.

From Command prompt, navigate to <Software_Installation_Directory>/Base and run the following command:

qlogin -cs <commserve name> -u <user name>

For example, to log on to CommServe 'server1' with username 'user1':

qlogin -cs server1 -u user1

Configuring an Instance Using XML

Available Parameters for Instance Configuration

The following table displays all the parameters you can use with the commands. To add a parameter to your command, use the following syntax: (A example is provided at the end of the table.)

qoperation execute -af <template XML file> -<parameter name> <value>

Parameter Description of Parameter Values
clientName Name of the client computer, as displayed in the CommCell Browser
appName Name of the application.

For Window, use 'DB2'.

For UNIX, use 'DB2 on Unix'

instanceName Name of the DB2 instance.
description Instance description. This can include content information, warning notes.
homeDirectory Path to the DB2 application's home directory.
encryptionFlag Option to enable encryption.

Valid values are:

  • ENC_MEDIA_ONLY, to enable Media Only (MediaAgent Side) encryption.
  • ENC_NETWORK_MEDIA, to enable Network and Media (Agent Side) encryption.
  • ENC_NETWORK_ONLY, to enable Network Only ((Agent Encrypts, MediaAgent Decrypts) encryption.
  • ENC_NONE, no encryption.
userAccount The User Account used by the system to access the DB2 application.
domainName (Windows only) Name of the domain server or name of machine.
password The DB2 user password.
userName The DB2 user name.
networkAgents Number of Network Agents.
softwareCompression Option to enable compression on the Client or MediaAgent computer. Valid values are:
  • ON_CLIENT, to enable software compression on the client.
  • ON_MEDIAAGENT, to enable software compression on the MediaAgent.
  • USE_STORAGE_POLICY_SETTINGS, to use the software compression options defined on the storage policy.
  • OFF, to disable software compression.
throttleNetworkBandwidth Enhancing backup performance by reducing network bandwidth overhead.

Valid values are 2-2147483647.

dataBackupStoragePolicy/storagePolicyName Name of the data storage policy for the DB2 data backup.
commandLineStoragePolicy/storagePolicyName Name of the command line storage policy for the DB2 command line backup.
logBackupStoragePolicy/storagePolicyName Name of the log storage policy for the DB2 log backup.
deDuplicationOptions/generateSignature A component of deduplication performed on the client or MediaAgent computer. Valid values are:
  • ON_CLIENT, to enable signature generation on the client.
  • ON_MEDIA_AGENT, to enable signature generation on the MediaAgent.
  • OFF, to disable the signature generation.
overrideDataPathsForCmdPolicy Option to override the library specified in the command line storage policy

Valid values are true/false.

associatedUserGroups User group association with the CommCell. This must be used with the 'associatedUserGroupsOperationType' parameter.
associatedUserGroupsOperationType Species whether the user group is being added or deleted. This must be used with the 'associatedUserGroups' parameter. Valid values are:
  • ADD - add the user group
  • DELETE - delete the user group

Adding an Instance

  1. Download the CreateInstance_Template.xml file and save it on the computer from where the command will be executed.
  2. Execute the following command on Windows from the <Software_Installation_Directory>/Base folder after substituting the parameter values.

    qoperation execute -af C:\XML\CreateInstance_Template.xml -instanceName 'db2instance_name' -description 'xxxx' -clientName client_name -appName 'DB2' -commandLineStoragePolicy/storagePolicyName 'xxxx' -logBackupStoragePolicy/storagePolicyName 'xxxx' -dataBackupStoragePolicy/storagePolicyName 'xxxx' -domainName 'xxxx' -userName 'xxxx' -password 'xxxx' -homeDirectory 'xxxxx'

  3. Execute the following command on Unix from the <Software_Installation_Directory>/Base folder after substituting the parameter values.

    qoperation execute -af <xml_path>/CreateInstance_Template.xml -instanceName 'db2instance_name' -description 'xxxx' -clientName client_name -appName 'DB2 on Unix' -commandLineStoragePolicy/storagePolicyName 'xxxx' -logBackupStoragePolicy/storagePolicyName 'xxxx' -dataBackupStoragePolicy/storagePolicyName 'xxxx' -userName 'xxxx' -password 'xxxx' -homeDirectory 'xxxxx'

Getting Instance Properties

  1. Download the GetInstanceProperties_Template.xml file and save it on the computer from where the command will be executed.
  2. Execute the following command from the <Software_Installation_Directory>/Base folder after substituting the parameter values.

    qoperation execute -af C:\XML\GetInstanceProperties_Template.xml -appName 'DB2' -clientName xxxxx -instanceName xxxxx

Updating an Instance

  1. Download the UpdateInstance_Template.xml file and save it on the computer from where the command will be executed.
  2. Execute the following command from the <Software_Installation_Directory>/Base folder after substituting the parameter values.

    qoperation execute -af C:\XML\UpdateInstance_Template.xml -instanceName 'db2instance_name' -description 'xxxx' -clientName client_name -appName 'DB2' -commandLineStoragePolicy/storagePolicyName 'xxxx' -logBackupStoragePolicy/storagePolicyName 'xxxx' -dataBackupStoragePolicy/storagePolicyName 'xxxx' -userName 'xxxx' -password xxxx -homeDirectory 'xxxx'

Deleting an Instance

Warning: If you do not include the instanceName parameter when you delete instances, all DB2 instances are deleted for the client.

  1. Download the DeleteInstance_Template.xml file and save it on the computer from where the command will be executed.
  2. Execute the following command from the <Software_Installation_Directory>/Base folder after substituting the parameter values.

    qoperation execute -af <xml_path>/DeleteInstance_Template.xml -appName 'DB2' -clientName 'xxxxx' -instanceName 'xxxxx'

Examples

The following example shows how to add a parameter for a command:

Creating Instance The following example shows the creation of a DB2 Instance that has:
  • Encryption,
  • Deduplication on the client,
  • Software compression using the storage policy settings,
  • A storage policy,
  • A log storage policy,
  • A command line storage policy and
  • The user group test2 being added.

On Windows client

qoperation execute -af C:\XML\CreateInstance_Template.xml -instanceName 'db2inst5' -description 'inst - db2_instance' -clientName 'db2_client' -appName 'DB2' -encryptionFlag 'ENC_NETWORK_AND_MEDIA' -generateSignature 'ON_CLIENT' -networkAgents 3 -softwareCompression 'USE_STORAGE_POLICY_SETTINGS' -throttleNetworkBandwidth '250' -commandLineStoragePolicy/storagePolicyName 'SP_LIB2' -logBackupStoragePolicy/storagePolicyName 'SP4' -dataBackupStoragePolicy/storagePolicyName 'SP3' -domainName 'db2_test_domain' -userName 'db2user' -password 'xxxx' -homeDirectory 'E:\DB2V9.7\SQLLIB' -userGroupName 'test2' -associatedUserGroupsOperationType 'ADD'

On UNIX Client

qoperation execute -af <xml_path>/CreateInstance_Template.xml -instanceName 'db2inst5' -description 'inst - db2_instance' -clientName 'db2_client' -appName 'DB2 on Unix' -encryptionFlag 'ENC_NETWORK_AND_MEDIA' -generateSignature 'ON_CLIENT' -networkAgents 3 -softwareCompression 'USE_STORAGE_POLICY_SETTINGS' -throttleNetworkBandwidth '250' -commandLineStoragePolicy/storagePolicyName 'SP_LIB2' -logBackupStoragePolicy/storagePolicyName 'SP4' -dataBackupStoragePolicy/storagePolicyName 'SP3' -domainName 'db2_test_domain' -userName 'db2user' -password 'xxxx' -homeDirectory 'E:\DB2V9.7\SQLLIB' -userGroupName 'test2' -associatedUserGroupsOperationType 'ADD'

Updating a Data Storage Policy on an Instance on Windows

qoperation execute -af C:\XML\UpdateInstance_Template.xml -instanceName 'db2instance_name' -clientName client_name -appName 'DB2' -dataBackupStoragePolicy/storagePolicyName 'new_storage_policy'

Updating a Data Storage Policy to Add Test Group 2 and Delete Test Group 1 on Unix

qoperation execute -af <xml_path>/UpdateInstance_Template.xml -instanceName 'db2instance_name' -clientName client_name -appName 'DB2 on Unix' -userGroupName 'test2' -associatedUserGroupsOperationType 'ADD' -userGroupName 'test1' -associatedUserGroupsOperationType 'DELETE'

Updating DB2 Home Path on Unix

qoperation execute -af <xml_path>/UpdateInstance_Template.xml -instanceName 'db2instance_name' -clientName client_name -appName 'DB2 on Unix' -homeDirectory 'Z:\DB2V9.7\SQLLIB'

Updating Command Line Storage Policy on Windows

qoperation execute -af C:\XML\UpdateInstance_Template.xml -instanceName 'db2instance_name' -clientName client_name -appName 'DB2' -commandLineStoragePolicy/storagePolicyName 'NEW_CL_POLICY'

Modifying DB2 User Credentials on Windows

operation execute -af C:\XML\UpdateInstance_Template.xml -instanceName 'db2instance_name' -clientName client_name -appName 'DB2' -
domainName 'db2_test_domain' -userName 'administrator' -password 'abcd'

Getting an Instance Properties for DB2 Instance 'db_win_instance' on Windows

qoperation execute -af C:\XML\GetInstanceProperties_Template.xml -appName 'DB2' -clientName 'client_test' -instanceName 'db_win_instance'

Getting an Instance Properties for DB2 Instance 'db_unix_instance' on Unix

qoperation execute -af <xml_path>/GetInstanceProperties_Template.xml -appName 'DB2 on Unix' -clientName 'client_test' -instanceName 'db_unix_instance'

Deleting DB2 Instance 'Windows_Instance1' on Windows

qoperation execute -af C:\XML\DeleteInstance_Template.xml -appName 'DB2' -clientName 'client_test' -instanceName 'Windows_Instance1'

Deleting DB2 Instance 'Unix_Instance2' on Unix

qoperation execute -af <xml_path>/DeleteInstance_Template.xml' -appName 'DB2 on Unix' -clientName 'client_test' -instanceName 'Unix_Instance2'

Configuring a Backup Set Using XML

Available Parameters for Backup Set Configuration

The following table displays all the parameters you can use with the commands. To add a parameter to your command, use the following syntax: (Some examples are provided at the end of the table.)

qoperation execute -af <template XML file> -<parameter name> <value>

Parameter Description of Parameter Values
clientName Name of the client computer.
appName Name of the application. In this case it would be 'DB2 ' or 'DB2 on Unix'.
instanceName Name of the DB2 instance
backupsetName Specifies the DB2 Backup set Name (DB2 database name). If you are running DB2 on Unix, this must be in upper case (TEST).
UserGroupName The name of the user group associated with the Backup Set.
newBackupSetName The new backup set name.
userDescription A user-defined description of the backup set.
Db2DefaultIndexSP/storagePolicyName Indicates an existing storage policy for DB2 log files
usesqlConnect This is an option "Connect as a Different User" if the user account isn't same as DB2 instance properties.
db2SqlConnectInfo/userName This is the DB2 user name. It must have the format domail_name\user_name on a Windows client. This option is required when the 'useSQLConnect' parameter is set to 'true'.
db2SqlConnectInfo/userPassword This is the DB2 user password. This option is required when the 'useSQLConnect' parameter is set to 'true'.
dB2DefaultIndexSP/storagePolicyName The storage policy for DB2 logs. This is required when creating a backup set.

Creating a Backup Set

  1. Download the createBackupSet.xml file and save it on the computer from where the command will be executed.
  2. Execute the following command from the <Software_Installation_Directory>/Base folder after substituting the parameters values.

    qoperation execute -af <xml_path>/createBackupSet.xml -appName 'DB2 on Unix' -clientName 'client_name' -instanceName 'instance_name' -backupsetName 'backupset_name' -Db2DefaultIndexSP/storagePolicyName 'test' -usesqlconnect 'true' -db2SqlConnectInfo/username 'domain\administrator' -db2SqlConnectInfo/password 'db2password'

Getting Backup Sets

This command gets the list of backup sets configured on the system.

  1. Download the get_backupset_template.xml file and save it on the computer from where the command will be executed.
  2. Execute the following command from the <Software_Installation_Directory>/Base folder after substituting the parameters values.

    qoperation execute –af <xml_path>/get_backupset_template.xml -appName 'DB2 on Unix' -clientName 'client_name' -instanceName 'instance_name'

Setting Backup Set Properties

  1. Download the update_backupset_template.xml file and save it on the computer from where the command will be executed.
  2. Execute the following command from the <Software_Installation_Directory>/Base folder after substituting the parameters values.

    qoperation execute –af <xml_path>/update_backupset_template.xml -appName 'DB2 on Unix' -clientName 'client_name' -instanceName 'instance_name' -backupsetName 'backupset_name' -dB2DefaultIndexSP/storagePolicyName 'storage_policy' -usesqlconnect 'true' -db2S qlConnectInfo/username 'domain\user'

Deleting a Backup Set

Warning: If you do not include the backupSetName parameter when you delete backup sets, all user-created backup sets are deleted on the DB2 instance.

  1. Download the delete_backupset_template.xml file and save it on the computer from where the command will be executed.
  2. Execute the following command from the <Software_Installation_Directory>/Base folder after substituting the parameters values.

    qoperation execute –af <xml_path>/delete_backupset_template.xml -appName 'DB2 on Unix' -clientName 'client_name' -instanceName 'instance_name' -backupsetName 'backupset_name'

Examples

Creating a Backup Set on Unix

qoperation execute -af <xml_path>/createBackupSet.xml -appName 'DB2 on Unix' -clientName 'my_machine' -instanceName 'db2inst7' -backupsetName 'TESTDB' -Db2DefaultIndexSP/storagePolicyName 'test'

Creating a Backup Set on Windows

qoperation execute -af C:\XML\createBackupSet.xml -appName 'DB2' -clientName 'my_machine' -instanceName 'db2inst7' -backupsetName 'TESTDB'

Getting the list of Backup Sets

qoperation execute –af C:\XML\get_backupset_template.xml -appName 'DB2' -clientName 'client_name' -instanceName 'instance_name'

Updating Backup Set

qoperation execute –af <xml_path>/update_backupset_template.xml -appName 'DB2 on Unix' -clientName 'db2_client' -instanceName 'DB2_Instance' -backupsetName 'db2_data_backup_set' -dB2DefaultIndexSP/storagePolicyName 'new_db2_storage_policy' -usesqlconnect 'true' -db2S qlConnectInfo/username 'dbserve/administrator' -
db2SqlConnectInfo/userPassword ‘db2 user password’

Deleting a Backup Set

qoperation execute –af <xml_path>/delete_backupset_template.xml -appName 'DB2 on Unix' -clientName 'db2_client' -instanceName 'DB2_Instance' -backupsetName 'db2_data_backup_set'

Configuring a Subclient Using XML

Available Parameters for Subclient Configuration

The following table displays all the parameters you can use with the commands. To add a parameter to your command, use the following syntax:

qoperation execute -af <template XML file> -<parameter name> <value>

Parameter Description of Parameter Values
appName Name of the application.

For Window, use 'DB2'.

For UNIX, use 'DB2 on Unix'

clientName Specifies the name of the client as displayed in the CommCell Browser (e.g., client1).
instanceName Specifies the name of the DB2 instance (e.g., dbname).
subclientName Specifies the name of the Subclient (e.g. subclient1).
backupsetName Specifies the backup set
encryptionFlag Specifies whether to enable encryption.

Valid values are:

  • ENC_MEDIA_ONLY, to enable Media Only (MediaAgent Side) encryption.
  • ENC_NETWORK_MEDIA, to enable Network and Media (Agent Side) encryption.
  • ENC_NETWORK_ONLY, to enable Network Only (Agent Encrypts, MediaAgent Decrypts) encryption.
  • ENC_NONE, no encryption.
description A general description of the subclient.
enableBackup Option to allow backup. Set this to 'true'.
networkAgents Number of Network Agents (e.g., 2). Valid vales are 1-4.
softwareCompression Specifies whether to enable compression on the Client or MediaAgent computer.

Valid values are:

  • ON_CLIENT, to enable software compression on the client
  • ON_MEDIAAGENT, to enable software compression on the MediaAgent
  • USE_STORAGE_POLICY_SETTINGS, to use the software compression options defined on the storage policy
  • OFF, to disable software compression
throttleNetworkBandwidth Enhancing backup performance by reducing network bandwidth overhead.

Valid values are 2-2147483647.

dataBackupStoragePolicy/storagePolicyName Specifies the data backup storage policy for the DB2 data backup.
enableDeduplication Specifies whether to enable or disable deduplication.

Valid values are true/false.

generateSignature A component of deduplication performed on the client or MediaAgent computer. Valid values are:
  • ON_CLIENT, to enable signature generation on the client.
  • ON_MEDIA_AGENT, to enable signature generation on the MediaAgent.
  • OFF, to disable the signature generation.
isSnapBackupEnabled Specifies whether Snap is enabled.

Valid values are True/False

snapShotEngineName The snap engine name.
snapToTapeProxyToUse/clientName The proxy name.
snapToTapeProxyToUseSource Use source if the proxy is unreachable.

Valid values are True/False

preBackupCommand Specifies the script to run before a backup starts.
postBackupCommand Specifies the script to run after the backup completes.
runPostBackup Specifies whether this process will execute for all attempts to run the phase.

Valid values are YES/NO.

runAs Option to specify the user name who has permissions to run the pre/post process scripts.

Valid values are:

  • USE_IMPERSONATION, to specify a user with enough privileges to run the scripts.

When using this value, you must provide the user credentials (see below):

-prepostUserName/userName <user name> -prepostUserName/password <password>

  • USE_LOCAL_SYS_ADMIN, to use the administrator account to run the scripts.
prepostUserName/userName User name of the account that has permission to run the pre or post process script.

This can only be used when 'runAs' is set to 'USE_IMPERSONATION'.

prepostUserName/password Password of the account that has permission to run the pre or post process script.

This can only be used when 'runAs' is set to 'USE_IMPERSONATION'.

db2BackupMode Specifies manner in which data file backups for this Subclient will be conducted.

Valid values are:

  • ONLINE_BACKUP, to perform an online backup of the database,
  • OFFLINE_BACKUP, to perform an offline (cold) backup of the database
db2NumberofBuffer Specifies the number of buffers for the backup.

Valid values are 1-1000.

db2BufferSize The size in KB of each buffer

Valid values are 8-1000.

db2Parallelism Specifies the number of table spaces to be read in parallel for restore

Valid values are 0-1000.

db2UseCompression Specifies whether to compress the backup

Valid values are True/False

db2BackupData Backup the data.

Valid values are True/False.

db2BackupType Specifies whether to backup the entire database. Can only be used when db2BackupData is 'true'.

Valid Values are

  • ENTIRE_DATABASE, backup the entire database
  • DATABASE_SUBSET, backup a subset
db2Content/db2DataFile Specifies the DB2 data to backup. Can only be used hen db2BackupData is 'True and db2BackupType is 'DATABASE_SUBSET'.
db2BackupLogFiles Backup the logs.

Valid values are True/False.

db2DeleteLogFilesAfter Delete the log files. Can only be set when backupLogFiles is 'True'.

Valid values are True/False.

db2DisableSwitchCurrentLog Set Disable Switch Current Log

This can be set if db2BackupLogFiles is 'True' and db2BackupData is 'False'.

Valid values are True/False.

db2SubclientProp/numberOfBackupStreams Specifies the maximum number of data backup streams.

Valid values are 1-50.

Creating a Subclient

  1. Download the CreateSubclient.xml file and save it on the computer from where the command will be executed.
  2. Execute the following command from the <Software_Installation_Directory>/Base folder after substituting the parameters values.

    On Windows:

    qoperation execute -af C:\XML\create_subclient_template.xml -appName 'DB2' -clientName 'xxxxx' -instanceName 'xxxxx' -backupsetName 'xxxxx' -subclientName 'xxxxx'

    On Unix:

    qoperation execute -af <xml_path>/create_subclient_template.xml -appName 'DB2 on Unix' -clientName 'xxxxx' -instanceName 'xxxxx' -backupsetName 'xxxxx' -subclientName 'xxxxx'

Getting Subclient Properties

  1. Download the GetSubclient.xml file and save it on the computer from where the command will be executed.
  2. Execute the following command from the <Software_Installation_Directory>/Base folder after substituting the parameters values.

    On Windows:

    qoperation execute -af C:\XML\get_subclient_template.xml -appName 'DB2' -clientName 'xxxxx' -instanceName 'xxxxx' -backupsetName 'xxxxx' -subclientName 'xxxxx'

    On Unix:

    qoperation execute -af <xml_path>/get_subclient_template.xml -appName 'DB2 on Unix' -clientName 'xxxxx' -instanceName 'xxxxx' -backupsetName 'xxxxx' -subclientName 'xxxxx'

Updating Subclient Properties

  1. Download the UpdateSubclient.xml file and save it on the computer from where the command will be executed.
  2. Execute the following command from the <Software_Installation_Directory>/Base folder after substituting the parameters values.

    On Windows:

    qoperation execute -af C:\XML\update_subclient_template.xml -appName 'DB2' -clientName 'client1' -instanceName 'dbname' -subclientName 'subclient1' -dataBackupStoragePolicy/storagePolicyName 'data_sp' -backupsetName 'backup_set'

    On Unix:

    qoperation execute -af <xml_path>/update_subclient_template.xml -appName 'DB2' -clientName 'client1' -instanceName 'dbname' -subclientName 'subclient1' -dataBackupStoragePolicy/storagePolicyName 'data_sp' -backupsetName 'backup_set'

Deleting a Subclient

Warning: If you do not include the subclientName parameter, all user-created DB2 subclients are deleted for the DB2 backup set.

  1. Download the DeleteSubclient.xml file and save it on the computer from where the command will be executed.
  2. Execute the following command from the <Software_Installation_Directory>/Base folder after substituting the parameters values.

    On Windows:

    qoperation execute -af C:\XML\delete_subclient_template.xml -appName 'DB2' -clientName 'client1' -instanceName 'dbname' -subclientName 'subclient1' -
    backupsetName 'backup_set'

    On Unix:

    qoperation execute -af <xml_path>/delete_subclient_template.xml -appName 'DB2 on Unix' -clientName 'client1' -instanceName 'dbname' -subclientName 'subclient1' -
    backupsetName 'backup_set'

Available Commands

The following section provides a list of commands that can be used by the DB2 iDataAgent.

Before executing a command, make sure to log on to the CommServe using the qlogin command. Similarly, use the qlogout command to log off from the CommServe.

Qcommand Parameter
qcreate

Instance

qinfo

BackupSet

Subclient

qlist

BackupSet

Subclient

qmodify

Subclient

qdelete

Client

Dataagent

qcreate Instance

Description

This command creates a new instance under the given agent.

Creating an On Demand instance does not require additional options as all options specified for the DB2 iDataAgent are accepted per their default value. If you need to create an DB2 instance for a Unix client, you must use the qcreate instance command with an input file. This is because '/' is an argument separator in Windows and hence cannot be used for paths.

Upon successful completion, this command displays the message 'Created instance successfully' on the command prompt. In case of an error, an error code and description are displayed as: 'Instance: Error errorcode: errordescription'.

Usage

qcreate instance -c client -a iDataAgent -n instance -dsp defaultstoragepolicy -csp cmdlinestoragepolicy -lsp logstoragepolicy [-tf tokenfile] [-tk token] [-af argsfile] [-h]

Options

-c Client computer name
-a Agent type installed on client computer (see Argument Values - Agent Types)
-n Name of the instance to be created
-dsp Default storage policy name
-csp Command line storage policy name
-lsp Log storage policy name
-du User Name
-dp Password
-dh Home path
-tf Reads token from a file
-tk Token string
-af Reads arguments from a file
-h Displays help

Argument Files

client Client computer name
dataagent Agent type installed on client computer (see Argument Values - Agent Types)
instance Instance name as reflected in the agent
defaultsp Default storage policy name
logsp Log storage policy name
cmdlinesp Command line storage policy name
dbuser User
dbpassword Password
dbhome Home
compressionat Compression at [CLIENT | MA]
networkagents Number of Network Agents
networkbandwidth Network Bandwidth

Diagnostics

Possible exit status values are:

0 - Successful completion.

1 - CLI usage failures, due to the use of an unsupported option or missing argument.

2 - Any other failure.

Example

Create an instance with name ins1 under client client1 and Agent Q_DB2 or Q_DB2_UNIX.

qcreate instance -c client1 -a Q_DB2 -n ins1 -dsp data -csp db2_test -lsp db2_test -dh /db2/db2_9

Create an on demand instance

qcreate instance -c client1 -a Q_DB2_UNIX -n 'On Demand Instance'

qinfo BackupSet

Description

This command displays information about a given backup set. If the agent supports instances above backup sets, only the backup sets under the specified instance are listed.

In case of an error, an error code and description are displayed as: "backupset: Error errorcode: errordescription"

Usage

qinfo backupset -c client -a dataagenttype -i instance -b backupset [-desc] [-tf tokenfile] [-tk token] [-h]

Options

-c Client computer name
-a Agent type installed on client computer (see Argument Values - Agent Types)
-i Instance name, required for a few agents
-b Backup set name
-desc Displays description provided by the user

To display the entire user description for the backup set without any other information, be sure to include the -desc option when you run the command. Otherwise, all the requested information along with only a partial description will be displayed.

-tf Reads token from a file
-tk Token string
-h Displays help

Diagnostics

Possible exit status values are:

0 - Successful completion.

1 - CLI usage failures, due to the use of an unsupported option or missing argument.

2 - Any other failure.

Examples

For WINDOWS

Display information about a backup set defaultBackupSet in client client1 and Agent Q_DB2.

qinfo backupset -c client1 -a Q_DB2 -b defaultBackupSet

For UNIX

Display information about a backup set defaultBackupSet in client client1 and Agent Q_UNIX_DB2.

qinfo backupset -c client1 -a Q_UNIX_DB2 -b defaultBackupSet

Sample Output:

Name         : defaultBackupSet
Default      : Yes
OnDemand     : No
Description  : Backup Set description

qinfo Subclient

Description

This command displays information about a subclient under a specified client, agent, and instance/backup set. The backup set name and instance name should be specified based on the agent, as certain agents place subclients under backup sets, and others place them under the instance.

In case of an error, an error code and description are displayed as: "subclient: Error errorcode: errordescription"

Usage

qinfo subclient -c client -a dataagenttype -i instance -b backupset -s subclient [-desc] [-tf tokenfile] [-tk token] [-h]

Options

-c Client computer name
-a Agent type installed on client computer (see Argument Values - Agent Types)
-i Instance name, required for a few agents
-b Backup set name, required for a few agents
-s Subclient name
-desc Displays description provided by the user

To display the entire user description for the backup set without any other information, be sure to include the -desc option when you run the command. Otherwise, all the requested information along with only a partial description will be displayed.

-tf Reads token from a file
-tk Token string
-h Displays help

Diagnostics

Possible exit status values are:

0 - Successful completion.

1 - CLI usage failures, due to the use of an unsupported option or missing argument.

2 - Any other failure.

Examples

For WINDOWS

Display information about a subclient sc1 in the client client1, Agent Q_DB2 and backup set bs1.

qinfo subclient -c client1 -a Q_DB2 -b bs1 -s sc1

For UNIX

Display information about a subclient sc1 in the client client1, Agent Q_UNIX_DB2 and backup set bs1.

qinfo subclient -c client1 -a Q_UNIX_DB2 -b bs1 -s sc1

Sample Output:

Name            : sc1
Default         : Yes
Storage Policy  : my_sp
Description     : Subclient description

qlist BackupSet

Description

This command lists the names of all the backup sets in the specified client and agent. If the agent supports instances above the backup set level, then only the backup sets under the specified instance are listed. Whenever more than one backup set is found, each backup set is listed in its own line on the command prompt. No message is displayed whenever backup sets are not found.

In case of an error, an error code and description are displayed as: "backupset: Error errorcode: errordescription"

Usage

qlist backupset -c client -a dataagenttype -i instance [-tf tokenfile][-tk token] [-h]

Options

-c Client computer name
-a Agent type installed on client computer (see Argument Values - Agent Types)
-i Instance name, required for certain agents
-tf Reads token from a file
-tk Token string
-h Displays help

Diagnostics

Possible exit status values are:

0 - Successful completion.

1 - CLI usage failures, due to the use of an unsupported option or missing argument.

2 - Any other failure.

Example

List all the Backup sets in the client client1, agent MyDataAgent.

qlist backupset -c client1 -a MyDataAgent

The output for the qlist backupset command is:

defaultBackupSet
bs1

qlist Subclient

Description

This command lists the names of all the subclients in a specified client, agent, and instance/backup set. Whenever more than one subclient is found, each subclient is listed in its own line on the command prompt. No message is displayed whenever subclients are not found.

In case of an error, an error code and description are displayed as: "subclient: Error errorcode: errordescription"

Usage

qlist subclient -c client -a dataagenttype -i instance -b backupset [-tf tokenfile] [-tk token] [-h]

Options

-c Client computer name
-a Agent type installed on client computer (see Argument Values - Agent Types)
-i Instance name, required for certain agents
-b Backup set name, required for certain agents
-tf Reads token from a file
-tk Token string
-h Displays help

Diagnostics

Possible exit status values are:

0 - Successful completion.

1 - CLI usage failures, due to the use of an unsupported option or missing argument.

2 - Any other failure.

Example

List all the Subclients in the client client1, Agent Q_DB2 and backup set bs1.

qlist subclient -c client1 -a Q_DB2 -i instance1 -b bs1

For UNIX

List all the Subclients in the client client1, Agent Q_UNIX_DB2 and backup set bs1.

qlist subclient -c client1 -a Q_UNIX_DB2 -i instance1 -b bs1

Sample Output:

default
sc1

qmodify Subclient

Description

This command modifies the storage policy, content, or user-defined description of a given subclient.

Upon successful completion, the qmodify subclient command displays the message "Modified subclient successfully" on the command prompt. In case of an error, an error code and description are displayed as: "subclient: Error errorcode: errordescription"

To use this command, you must ensure that the  QCMD_SUPPORT_MODIFY_SUBCLIENT additional setting is set to 1.

Usage

qmodify subclient -c client -a dataagenttype -i instance -s subclient -sp storagepolicy -f content [-ow overwrite] [-drs datareaders] [-wc y|n] [-af ArgumentFilepath] [-tf tokenfile] [-tk token] [-h]

Options

-c Client computer name
-a Agent type installed on client computer (see Argument Values - Agent Types)
-i Instance name, required for a few agents
-s Name of the subclient to be modified
-sp Name of the storage policy to be associated with the subclient
-f File/Directory Path to be added to the existing content

When using the -f content option, you must verify that the subclient content is in the correct format path. This command does not enforce the content format, and any path (including an incorrect path) can be specified. This may result in incorrect content being assigned to a file system subclient and a "pending" subclient scan.

-wc Do file/directory paths have wildcards (y|n)
-ow If the contents needs to be overwritten (0:1)
-drs Number of data readers
-af Input file containing arguments
-tf Reads token from a file
-tk Token string
-h Displays help

Argument File

client Client computer name
dataagent Agent type installed on source client computer (see Argument Values - Agent Types)
instance Instance name to which the subclient belongs, required for certain agents
subclient Name of the subclient to be modified
sp New storage policy for the subclient
content List of files/directories to be added to the existing content

The content option is supported for file system Agents. Although, changing the storage policy association of a subclient is supported for all agents.

datareaders Number of data readers
wildcard Do file/directory paths have wildcards (y|n)
description User-defined description

Diagnostics

Possible exit status values are:

0 - Successful completion.

1 - CLI usage failures, due to the use of an unsupported option or missing argument.

2 - Any other failure.

Examples

For WINDOWS

Modify a subclient with name sc1 under client client1, Agent Q_DB2 and backup set bs1 by changing its storage policy to sp2.

qmodify subclient -c client1 -a Q_DB2 -b bs1 -s sc1 -sp sp2

For UNIX

Modify a subclient with name sc1 under client client1, Agent Q_UNIX_DB2 and backup set bs1 by changing its storage policy to sp2.

qmodify subclient -c client1 -a Q_UNIX_DB2 -b bs1 -s sc1 -sp sp2

qdelete Client

Description

This command can be used to deconfigure and/or delete a client, along with its iDataAgents.

By default, the qdelete client command asks for confirmation before deleting the client. You can skip the confirmation prompt with the -y option.

Upon successful completion, qdelete client displays the message "Deleted the client successfully" on the command prompt. In case of an error, an error code and description are displayed as: "client: Error errorcode: errordescription

Usage

qdelete client [-cs <commserve_host_name>] -c <client> [-deconfigure] [-y] [-tf <tokenfile>] [-tk <token>] [-af <clientfile>] [-h]

Options

-cs CommServe host name
-c Client computer name
-deconfigure Deconfigures a client without deleting it
-y Delete without confirmation
-tf Reads token from a file
-tk Token string
-af Reads client name from a file
-h Displays help

Diagnostics

Possible exit status values are:

0 - Successful completion.

1 - CLI usage failures, due to the use of an unsupported option or missing argument.

2 - Any other failure.

Examples

  • Delete a client with name client1.

    qdelete client -c client1
    This command deconfigures and deletes a client, do you want to continue (y/n)? [n]

  • Deconfigure, but do not delete, a client with name client1

    qdelete client -c client1 -deconfigure -y

  • Delete a set of clients specified in an argument file.

    qdelete client -af "E:\clients.txt"

    In this example, clients.txt is a text file containing a list of client names. Ensure that the file is in the following format:

    [client]
    Client01
    Client02
    ClientXX

You can mass-delete clients with or without their associated MediaAgents using the qdelete client command. You can include this command (along with the qdelete mediaagent command, if desired) in a script. Mass deletion of these items is useful if you want to remove them after a split of a CommCell. To mass-delete items where the CommCell is not split, be sure to run the script from the install location of the CommServe.

qdelete Dataagent

Description

This command deconfigures and/or deletes a given iDataAgent.

By default, the qdelete dataagent command asks for confirmation before deletion. You can skip the confirmation prompt using the "-y" option.

Upon successful completion, qdelete dataagent displays the message "Deleted the iDataAgent successfully" on the command prompt. In case of an error, an error code and description are displayed as: "dataagent: Error errorcode: errordescription"

Usage

qdelete dataagent -c client -a iDataAgent [-deconfigure] [-y] [-tf tokenfile] [-tk token] [-h]

Options

-c Client computer name
-a iDataAgent to be deleted (see Argument Values - Agent Types)
-d Deconfigures the iDataAgent without deleting it
-y Delete without confirmation
-tf Reads token from a file
-tk Token string
-h Displays help

Diagnostics

Possible exit status values are:

0 - Successful completion.

1 - CLI usage failures, due to the use of an unsupported option or missing argument.

2 - Any other failure.

Examples

  • Delete an iDataAgent MyDataAgent under client client1.

    qdelete dataagent -c client1 -a MyDataAgent
    This command deconfigures and deletes an iDataAgent, do you want to configure (y/n)

  • Deconfigure an iDataAgent MyDataAgent under client client1 without any confirmation.

    qdelete client -c client1 -a MyDataAgent -deconfigure - y

Log Off from the CommServe

Once you have completed the command line operations, you can logout from the CommServe using the following command:

qlogout -cs commserve

For example, to log out from the CommServe 'Server1'.

qlogout -cs Server1