Command Line Syntax

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 template file> -<parameter name> <parameter value>
  • When you download the XML template file, you can place it in the software_installation_path\Base folder or you can specify the path to the XML file on the command line. In the following example, the XML file is in the C:\templates\XML folder:

    qoperation execute -af C:\templates\XML\release_client_license_template.xml
  • Parameters can be specified in the XML template file or on the command line if they frequently change. If the same parameter is specified both in the XML file and on the command line, the command line value is used.

    When specifying parameters on the command line, enter the XML parameter name followed by the parameter value: -<xml parameter name> <parameter value>

    Examples

    • To use "testclient" as the client name, type -entity/clientName testclient

    • To delete a subclient for a Sybase agent, type 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.

    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.

    Example

    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 <entity> element is updated:

    <entity>
       <appName>Virtual Server</appName>
       <clientName>xxxxx</clientName>
       <instanceName>xxxxx</instanceName>
       <backupsetName>xxxxx</backupsetName>
       <subclientName>xxxxx</subclientName>
     </entity>

    The <separateProxyForSnapToTape> element is not updated:

    <separateProxyForSnapToTape>
       <clientName />
     </separateProxyForSnapToTape>

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]

Example:

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

Using Passwords with Special Characters

When you input a password from the command line interface, if the password contains special characters, prefix each special character with an escape character or enter the password within quotes ("). For example, "test&2%" or test^&2%%.

The following table lists the escape sequence for commonly used special characters.

Special Character

Escape Sequence

;

^;

&

^&

%

%%

,

^,

.

\.

For more information on using escape characters, consult Microsoft documentation.

Loading...