Command Line Interface - Configuration - Sybase 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

Instance Configuration

Available Parameters for Server Configuration

The following table displays all the parameters you can use with the commands mentioned in the above sections. 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. In this case it would be 'Sybase Database'
instanceName Name of the Sybase instance
description A general description of the instance
sybaseHome Path for the Sybase application software
sybaseASE Sybase ASE environment variable
sybaseOCS Sybase OCS environment variable
configFile Path of the configuration file for the instance
sharedMemoryDirectory Path for the shared memory files
enableAutoDiscovery Option to enable/disable auto discovery of Sybase databases.

Valid values are True/False.

sybaseBlockSize Option to specify the number of bytes per I/O operation for a dump device.

Minimum Value is 2048 bytes.

Valid values are multiples of the database page size like 8192 (8k), 16384 (16k), or 32768 (32k).

backupServer Name of the Sybase Server
localAdministrator/userName Name of the user that has local administrator rights to administer the Sybase application. This is the account used by the user to log in to and use the application to run jobs.
localAdministrator/password Password for the local administrator
saUser/userName Name of the Sybase database administrator who has permissions to perform jobs
saUser/password Password for the Sybase database administrator
defaultDatabaseStoragePolicy/storagePolicyName Name of the data storage policy for the default subclient

Creating 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 from the <Software_Installation_Directory>/Base folder after substituting the parameter values.

    qoperation execute -af CreateInstance_Template.xml -appName 'Sybase Database' -clientName 'xxxxx' -instanceName 'xxxxx' -sybaseHome 'xxxxx' -sybaseASE 'xxxxx' -sybaseOCS xxxxx -configFile 'xxxxx' -sharedMemoryDirectory 'xxxxx' -sybaseBlockSize 'xxxxx' -backupServer 'xxxxx' -defaultDatabaseStoragePolicy/storagePolicyName 'xxxxx' -localAdministrator/userName 'xxxxx' -localAdministrator/password 'xxxxx' -saUser/UserName 'xxxxx' -saUser/password 'xxxxx' -enableAutoDiscovery 'xxxxx'

Modifying an Instance

  1. Download the ModifyInstance_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 ModifyInstance_Template.xml -appName 'Sybase Database' -clientName xxxxx -instanceName xxxxx -sybaseHome 'xxxxx' -sybaseASE 'xxxxx' -sybaseOCS 'xxxxx' -configFile 'xxxxx' -sharedMemoryDirectory 'xxxxx' -sybaseBlockSize 'xxxxx' -backupServer 'xxxxx' -saUser/userName 'xxxxx' -enableAutoDiscovery 'xxxxx'

Getting Instance Properties

  1. Download the GetInstance_Properties_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 GetInstance_Properties_Template.xml -appName 'Sybase Database' -clientName 'xxxxx' -instanceName 'xxxxx'

Click here to see a Sample Output

Deleting an Instance

  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 deleteInstance_Template.xml -appName 'Sybase Database' -clientName 'xxxxx' -instanceName 'xxxxx'

Examples

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

Creating an Instance

qoperation execute -af CreateInstance_Template.xml -clientName 'sybserver2' -instanceName 'S155syb2' -sybaseHome '/sybase/syb155' -sybaseASE 'ASE-15_0' -sybaseOCS 'OCS-15_0' -configFile '/sybase/syb155/ASE-15_0/S155syb2.cfg' -sharedMemoryDirectory '/sybase/syb155/ASE-15_0/lib' -backupServer 'S155syb2_BS' -defaultDatabaseStoragePolicy/storagePolicyName 'sp_sybase_test' -localAdministrator/userName 'sybase_user' -localAdministrator/password 'password' -saUser/UserName 'sa_user' -saUser/password 'sa_password' -sybaseBlockSize '4096' -enableAutoDiscovery 'true' -description 'ServicePack Testing'

Modifying an Instance To include the configuration file for the instance, add the 'configFile' parameter to the following command:

qoperation execute -af ModifyInstance_Template.xml -appName 'Sybase Database' -clientName client1 -instanceName instance1 -configFile '/data/sybase/syb_xxx/config_file.cfg'

Subclient Configuration

Available Parameters for Subclient Configuration

The following table displays all the parameters you can use with the commands mentioned in the above sections. 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 'Sybase Database'.
subclientname Name of the Sybase subclient.
contentOperationType Modification type. Valid values are
  • ADD, to add content to the subclient
  • OVERWRITE, to overwrite contents to the subclient.
  • DELETE, to delete the contents from the subclient.
enableBackup Option to enable backup of Subclient.

Valid values are True/False.

onDemandSubclient The subclient is for an on-demand backup

Valid values are

true

false

dataBackupStoragePolicy/storagePolicyName Name of the Storage Policy used for the backup.
sybaseContent/databaseName Databases to be backed up.
numberOfBackupStreams Option to change the number of streams for data backup.
numberOfTransactionLogStreams Option to change the number of streams for log backup.
instanceName Name of the Sybase instance
description A general description of the subclient.
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.
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.

enableDeduplication Specifies whether to  enable or disable deduplication.

Valid values are true/false.

generateSignature Specifies whether deduplication is performed on the client or MediaAgent computer.                                                                                                                                                                                                 

This can only be set when the "enableDeduplication" parameter is 'true'.

Valid values are:

  • ON_CLIENT, to enable signature generation on the client.
  • ON_MEDIA_AGENT, to enable signature generation on the MediaAgent.
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.

 

Creating a Subclient

  1. Download the create_subclient_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 create_subclient_template.xml -appName 'Sybase Database' -clientName 'xxxxx' -instanceName 'xxxxx' -subclientName 'xxxxx'

Modifying Subclient Properties

  1. Download the update_subclient_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 update_subclient_template.xml -appName 'Sybase Database' -clientName 'xxxxx' -instanceName 'xxxxx' -subclientName 'xxxxx' -dataBackupStoragePolicy/storagePolicyName 'xxxxx' -contentOperationType 'xxxxx' -sybaseContent/databaseName 'xxxxx'

Getting Subclient Properties

  1. Download the get_subclient_properties_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 get_subclient_properties_template.xml -appName 'Sybase Database' -clientName 'xxxxx' -instanceName xxxxx -subclientName 'xxxxx'

Click here to see a Sample Output

Deleting a Subclient

  1. Download the remove_subclient_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 remove_subclient_template.xml -appName 'Sybase Database' -clientName 'xxxxx' -instanceName 'xxxxx' -subclientName 'xxxxx'

Examples

The following examples show how to add a parameter for a command:

Adding a Subclient To add a database for backup, add the 'sybaseContent/databaseName' parameter to the following command:

qoperation execute -af update_subclient_template.xml -appName 'Sybase Database' -clientName 'client1' -instanceName 'instance1' -subclientName 'subclient1' -contentOperationType 'ADD' -sybaseContent/databaseName 'db1'

Updating a Subclient To assign a storage policy to a subclient, add the 'dataBackupStoragePolicy/storagePolicyName' parameter to the following command:

qoperation execute -af update_subclient_template.xml -appName 'Sybase Database' -clientName 'client1' -instanceName 'instance1' -subclientName 'subclient1' -dataBackupStoragePolicy/storagePolicyName 'sp1'

Updating a Subclient To change the number of streams for data and log backup, add the parameter  'sybaseSubclientProp/numberOfBackupStreams'  and 'sybaseSubclientProp/numberOfTransactionLogStreams' to the following command:

qoperation execute -af update_subclient_template.xml -appName 'Sybase Database' -clientName 'client1' -instanceName 'instance1' -subclientName 'subclient1' -dataBackupStoragePolicy/storagePolicyName 'sp1' -sybaseSubclientProp/numberOfBackupStreams '3' -sybaseSubclientProp/numberOfTransactionLogStreams '4' -contentOperationType ADD -sybaseContent/databaseName 'db1'

Specifying Databases for On-Demand Backup

You can use an external input file to specify the content when you perform an on-demand backup.

Best Practice: If you use Sybase ASE version 15.7 ESD #2 (SP100) or later, you can configure the Sybase software to run transaction log dumps even when a full or cumulative dump is running. When you want to perform an on-demand backup on the Sybase server, set 'enable concurrent dump tran' to 0. If you have set the value to 1, you may an encounter an error during the restore. For more information, see  A Restore of an on-demand backup fails.

Procedure

  1. On the Sybase Agent host, run the qlogin command to log on to the CommServe computer.
  2. Download the  create_subclient_template.xml file to the computer where you will run the command.

    For information on supported subclient XML parameters, see Available XML Parameters for Sybase Subclient Configuration.

  3. On the command line, go to Software_Installation_Directory/Base and type the following command.

    qoperation execute -af xml_path\create_subclient_template.xml -appName 'Sybase Database' -clientName 'client_name' -instanceName 'instance_name' -subclientName 'subclient_name' -dataBackupStoragePolicy/storagePolicyName 'storage_policy_name' -onDemandSubClient true

  4. On the client computer where you will create the subclient to backup, create a text file that contains the list of databases that you want to back up.

    Note: The file must contain one database on each line and must contain all the databases to back up.

    Example

    An input file with 3 databases

    db1
    db2
    db3

  5. Download the backup_template.xml file to the computer where you will run the command.
  6. On the command line, go to Software_Installation_Directory/Base and type the following command.

    qoperation execute -af xml_path\backup_template.xml -clientName 'client_name' -instanceName 'instance_name' -subclientName 'subclient_name' –ondemandinputfile c:\DatabaseFile.txt –backupLevel FULL

  7. Run the qlogout command to log off the CommServe computer.

Examples

Create the subclient

qoperation execute -af xml_path\create_subclient_template.xml appName 'Sybase Database' -instanceName S155syb6 -clientName sybserver6 -subclientName ondemand_sub -dataBackupStoragePolicy/storagePolicyName sybase_sp -onDemandSubClient true

Perform the backup

qoperation execute -af xml_path\backup_template.xml -appName 'Sybase Database' -clientName sybserver6 -instanceName S155syb6 -subclientName ondemand_sub -ondemandinputfile /BOL/ondemand/list.txt -backupLevel FULL

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