Command Line Interface - Configuration - SharePoint Server iDataAgent

Configuration Backup Restore
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

Document Subclient Configuration

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 "SharePoint Server" -clientName "xxxxx" -instanceName defaultInstance -backupsetName Documents -subclientName "xxxxx"

Modifying a Subclient

  1. Download the modify_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 modify_subclient_template.xml -appName "SharePoint Server" -clientName "xxxxx" -instanceName defaultInstance -backupsetName Documents -subclientName "xxxxx" -contentOperationType ADD -content/spContentPath "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 "SharePoint Server" -clientName "xxxxx" -instanceName defaultInstance -backupsetName Documents -subclientName "xxxxx"

Deleting a Subclient

  1. Download the delete_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 delete_subclient_template.xml -appName "SharePoint Server" -clientName "xxxxx" -instanceName defaultInstance -backupsetName Documents -subclientName "xxxxx"

Database Subclient Configuration

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 "SharePoint Server" -clientName "xxxxx" -instanceName defaultInstance -backupsetName Databases -subclientName "xxxxx"

Modifying a Subclient

  1. Download the modify_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 modify_subclient_template.xml -appName "SharePoint Server" -clientName "xxxxx" -instanceName defaultInstance -backupsetName Databases -subclientName "xxxxx" -contentOperationType ADD -content/spContentPath "xxxxx"

Deleting a Subclient

  1. Download the delete_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 delete_subclient_template.xml -appName "SharePoint Server" -clientName "xxxxx" -instanceName defaultInstance -backupsetName Databases -subclientName "xxxxx"

Site Collection Subclient Configuration

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 "SharePoint Server" -clientName "xxxxx" -instanceName defaultInstance -backupsetName SiteCollection -subclientName "xxxxx"

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
appName Name of the application. In this case it would be 'SharePoint Server'.
clientName Name of the client computer.
instanceName Name of the SharePoint Server instance.
backupsetName Name of the SharePoint Server backup set. Valid values are:
  • Documents
  • Databases
  • SiteCollection
subclientName Name of the SharePoint Server subclient.
enableBackup Option to enable backup of Subclient.

Valid values are True/False.

collectObjectListDuringBackup To enable/disable object list collection during backup.
networkAgents Number of Network Agents. Valid range is 1 to 4.
throttleNetworkBandwidth Enhancing backup performance by reducing network bandwidth overhead.

Valid values are 0/1.

encryptionFlag Option to set the encryption points during backups. Valid values are:
  • ENC_MEDIA_ONLY, to encrypt the backup data after transmission and prior to storage on the media.
  • ENC_NETWORK_AND_MEDIA, to encrypt the backup data before transmission. The data is stored encrypted on the media.
  • ENC_NETWORK_ONLY, to encrypt the backup data before transmission and then decrypt the data prior to storage on the media.
  • ENC_NONE, to disable data encryption.
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.
  • OFF, to disable software compression.
dataBackupStoragePolicy/storagePolicyName Name of Storage Policy to be associated for backup.
enableDeduplication Option to enable deduplication on subclient.

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 signature generation.
postBackupCommand Path to the post process script that will be run after the backup.
preBackupCommand Path to the pre process script that will be run before the backup.
runPostBackup Option to run a process after backup completes.

Valid values are Yes/No.

contentOperationType Option to add, modify or delete the subclient content. Valid values are:
  • ADD, to add the subclient content.
  • OVERWRITE, to modify the subclient content.
  • DELETE, to delete the subclient content.

If a subclient is deleted from the CommCell Console or from the command line, its content should be aged. Another subclient should be able to add to the same content.

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

Set Exclude Filter

qoperation execute –af  modify_subclient_template.xml -appName "SharePoint Server" -clientName "xxxxx" -instanceName defaultInstance -backupsetName Documents -subclientName "xxxxx" -contentOperationType ADD -content/spExcludeFilterPath "xxxxx"

Set Except Filter

qoperation execute –af modify_subclient_template.xml -appName "SharePoint Server" -clientName "xxxxx" -instanceName defaultInstance -backupsetName Documents -subclientName "xxxxx" -contentOperationType ADD -content/spExceptFilterPath "xxxxx"

Deleting the Client (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.

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