Command Line - Syntax

Table of Contents

Command Syntax for QCommands

QCommands have the following syntax:

<qcommand operation> -<option name> <option value>

The following is a QCommand example used in the Command Line documentation to list the names of all the subclients for an agent:

qlist subclient -c client -a myagent -i myinstance -b mybackupset [-tf tokenfile] [-tk token] [-h]

where qlist subclient is the QCommand operation and the rest are options with their corresponding values. Options that are shown in brackets [...] are optional.

Command Syntax for XML Commands

  • XML commands have the following syntax:

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

  • Parameters can be specified in the XML file or on the command line if they frequently change. When specifying parameters on the command line, enter the XML parameter name followed by the parameter value.

    -<xml parameter name> <parameter value>


    To use "testclient" as the client name, type the following:

    -clientName testclient

    To delete a subclient for a Sybase agent, type the following:

    qoperation execute –af remove_subclient_template.xml -clientName xxxxx -instanceName xxxxx -subclientName xxxxx

    where xxxxx is the parameter value.

  • If a parameter name is used for multiple elements in the XML file and that parameter is set on the command line, you must provide the parent element along with the parameter name. Providing the parent element ensures that the correct parameter is updated.


    To update the clientName parameter in the <entity> element but not the clientName parameter in the <separateProxyForSnapToTape> element, type the following:

    qoperation execute -af update_snap_subclient_template.xml -appName 'Virtual Server' -entity/clientName xxxxx -entity/backupsetName xxxxx -entity/subclientName xxxxx -isSnapBackupEnabled true -useSeparateProxyForSnapToTape true

    The the <entity> element is updated:

      <appName>Virtual Server</appName>

    The <separateProxyForSnapToTape> element is not updated:

      <clientName />

Best Practice: When specifying common parameters on the command line, include the parent element name along with the parameter name, for example, include the parent element for clientName, InstanceName, backupsetName, appName, and subclientName.

Using XML Elements

The following examples set a value and remove a value using XML elements:

  • Set a value by placing the value between the opening and closing elements: <clientDescription>test</clientDescription>
  • Remove a value by placing a space between the opening and closing elements: <clientDescription> </clientDescription>

The following examples show elements that are ignored:

  • There is no value or space between the opening and closing elements: <clientDescription></clientDescription>
  • The element is displayed in empty element shorthand: <clientDescription/>

Using Single Quotes

Single quotes (' ') are needed to wrap the value of a parameter in the following circumstances:

  • when the value has a space and - , for example:

    qlist client -cg 'DB - Oracle'

    where the clientgroup parameter is the name of the client group.

  • when the value has multiple words, for example:

    -appName 'Sybase Database'

    where the appName parameter is the name of the iDataAgent.

  • when the value is a path location, for example:

    -configFile '/data/sybase/syb_xxx/config_file.cfg'

    where the configFile parameter is the path of the configuration file for the Sybase instance.

Date and Time Format

For commands in which a time must be specified, the time must be entered in the following format:

mm/dd/yyyy hh:mm[:ss] or yyyy/mm/dd hh:mm[:ss]


08/30/2005 05:58
08/30/2005 05:58:15