SnapProtect - Command Line Interface

Table of Contents

SnapProtect Configuration

The following sections describe the steps to enable SnapProtect on a client and configure a subclient with SnapProtect properties.

Enabling or Disabling SnapProtect Backup at Client Level

  1. Download the update_client_snap_backup_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 update_client_snap_backup_template.xml -entity/clientName xxxxx -EnableSnapBackups xxxxx

Enabling or Disabling SnapProtect Backup at Subclient Level

  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 parameter values.

    qoperation execute -af update_subclient_template.xml -entity/appName 'xxxxx' -entity/clientName xxxxx -entity/backupsetName xxxxx -entity/subclientName xxxxx -isSnapBackupEnabled xxxxx

Creating an SnapProtect Enabled 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 parameter values.

    qoperation execute -af create_subclient_template.xml -subClientEntity/clientName xxxxx -subClientEntity/backupsetName xxxxx -subClientEntity/subclientName xxxxx -storagePolicyName xxxxx -isSnapBackupEnabled true snapToTapeProxyToUse/clientName xxxxx -useSeparateProxyForSnapToTape true -separateProxyForSnapToTape/clientName xxxxx -snapToTapeProxyToUseSource true -subClientEntity/instanceName xxxxx -cssnaptest -contentOperationType ADD -content/path xxxxx

Selecting Transport Mode

  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 parameter values.

    qoperation execute -af update_subclient_template.xml -entity/appName 'xxxxx' -entity/clientName xxxxx -entity/backupsetName xxxxx -entity/subclientName xxxxx -isSnapBackupEnabled xxxx -transportModeForVMWare AUTO

Setting the Proxy for ESX Host

  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 parameter values.

    qoperation execute -af update_subclient_template.xml -entity/appName 'xxxxx' -entity/clientName xxxxx -entity/backupsetName xxxxx -entity/subclientName xxxxx -isSnapBackupEnabled true -proxyESXHost xxxxx

Enabling Application Aware Backups and Truncating Exchange Database Logs

  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 parameter values.

    qoperation execute -af update_subclient_template.xml -entity/appName 'xxxxx' -entity/clientName xxxxx -entity/backupsetName xxxxx -entity/subclientName xxxxx -isSnapBackupEnabled true -backupForGranularRecovery true -truncateExDBLogs true

Selecting a Proxy Client for Snap

  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 parameter values.

    qoperation execute -af update_subclient_template.xml -entity/appName 'xxxxx' -entity/clientName xxxxx -entity/backupsetName xxxxx -entity/subclientName xxxxx -isSnapBackupEnabled true - snapToTapeProxyToUse/clientName xxxxx

Selecting a Proxy Client for Movement to Tape

  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 parameter values.

    qoperation execute -af update_subclient_template.xml -appName 'xxxxx' -entity/clientName xxxxx -backupsetName xxxxx -subclientName xxxxx -isSnapBackupEnabled true -useSeparateProxyForSnapToTape true -separateProxyForSnapToTape/clientName xxxxx

If you use useSeparateProxyForSnapToTape, set the snapToTapeProxyToUseSource parameter to true so that SnapProtect operations take place in the original client computer, in case the proxy is unreachable.

Pre and Post Processes

Use the following steps to perform pre and post processes:

  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 parameter values.

qoperation execute -af update_client_template.xml -entity/clientName xxxxx -appName 'xxxxx' -entity/instanceName xxxxx -entity/backupsetName xxxxx -entity/subclientName xxxxx -isSnapBackupEnabled True -preSnapCommand xxxxx -postSnapCommand xxxxx -preSnapProcessOn 1 -postSnapProcessOn 1

Available Parameters

The following table describes the parameters used in the above sections.

Parameter Description of Parameter Values
appName Name of the agent. Valid values are:
  • Exchange Database
  • File System
  • Image Level on Unix
  • MySQL
  • NAS
  • Notes Database
  • Oracle
  • Oracle RAC
  • PostgreSQL
  • SAP for MAX DB
  • SAP for Oracle
  • SQL Server
  • Sybase Database
  • Virtual Server
backupForGranularRecovery Option to enable the application aware backup operation to allow granular recovery of files. Valid values are true/false.

When this option is set to true, you can also truncate the Exchange Database logs using the truncateExDBLogs parameter.

backupsetname Name of the backup set. If the backup set name is not specified in the command query, the default backup set is used by default.
backupType Option to set the backup level at which the SnapProtect backup should run. Valid values are:
  • FILE_LEVEL
  • VOLUME_LEVEL
  • DISK_LEVEL
entity/clientName Name of the client computer.
enableSnapBackup Option to enable the SnapProtect configuration on the client.

Valid values are true/false.

isSnapBackupEnabled Option to enable the SnapProtect configuration on the subclient.

Valid values are true/false.

snapToTapeProxyToUse/clientName Name of the separate proxy computer for snap to tape.

To use this option, set the useSeparateProxyForSnapToTape parameter to true.

snapToTapeProxyToUseSource Option to allow SnapProtect operations to take place in the original client computer, in case the proxy is unreachable.

Valid values are true/false.

separateProxyForSnapToTape/clientName Name of the client computer that will be used as a proxy to perform SnapProtect operations.
subclientname Name of the subclient.
transportModeForVMWare Option to set the transport mode of your environment. Valid values are:
  • AUTO, to allow the software to automatically set the transport mode based on your setup.
  • SAN
  • HOT_ADD
  • NAS
  • NBD_SSL
  • NBD
truncateExDBLogs Option to truncate the Exchange Database logs. Valid values for this parameter are true/false. Must be used with backupForGranularRecovery.
useSeparateProxyForSnapToTape Option to enable the use of a proxy computer to perform movement to tape operations on a different client. Valid values are true/false.

When this option is set to true, you also need to specify the proxy computer using the separateProxyForSnapToTape/clientName parameter.

Snap Backup

Performing a Snap Backup

Before you begin, check whether you have the input xml file, which contains the parameter values for configuring the snap backup options. The input xml file can be obtained by:

  1. Downloading the input xml file template and saving it on the computer from where the backup will be performed.
  2. Generating the input xml file from the CommCell Console and saving it on the computer from where the backup will be performed.

Use the following steps to perform the snap backup:

  1. Download the snapbackup_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 snapbackup_template.xml -appName 'File System' -entity/clientName xxxxx -backupsetName xxxxx -subclientName xxxxx -backupLevel FULL

Examples

Performing a full backup qoperation execute -af snapbackup_template.xml -appName 'File System' -entity/clientName client1 -backupsetName backupset1 -subclientName subclient1 -backupLevel FULL
Performing an incremental backup qoperation execute -af snapbackup_template.xml -appName 'File System' -entity/clientName client1 -backupsetName backupset1 -subclientName subclient1 -backupLevel INCREMENTAL
Performing a differential full backup qoperation execute -af snapbackup_template.xml -appName 'File System' -entity/clientName client1 -backupsetName backupset1 -subclientName subclient1 -backupLevel DIFFERENTIAL

Performing a Backup Copy

Before you begin, check whether you have the input xml file, which contains the parameter values for configuring the snap backup options. The input xml file can be obtained by:

  1. Downloading the input xml file template and saving it on the computer from where the backup will be performed.
  2. Generating the input xml file from the CommCell Console and saving it on the computer from where the backup will be performed.

Use the following steps to perform the backup:

  1. Download the inline_backup_copy_template.xml file or the offline_backup_copy_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 inline_backup_copy_template.xml

Snapshots Operations

Before You Begin

You need the VolumeID of the backup job ID in order to run the mount command. To obtain the VolumeID identifier, use the qlist snap command. Refer to qlist snap.

Mounting Snapshots

Single Snapshot

This command allows you to mount single snapshot.

qoperation snap [-cs <commserve_host_name>] -o mount [-cid <Commcell Id>] -v <Volume Id> [-dc <Destination Client Name>] [-dpath <Destination Path>] [-tf <tokenfile>] [-tk <token>] [-h]

Multiple Snapshots

This command allows you to mount multiple snapshots.

qoperation snap [-cs <commserve_host_name>] -o mount -v <Volume Id1> -v <Volume Id2> [-dc <Destination Client Name>] [-dpath <Destination Path1>] [-dpath <Destination Path2>]

In case of an error, an error code and the error description are displayed in the following format: "snap: Error errorcode: errordescription"

Options:

-cs CommServe host name
-o Operation to be performed on the snapshot
-cid CommCell Id
-v Volume Id
-dc Destination client name
-dpath Destination path
-tf Reads token from a file
-tk Token string
-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 for mounting a single snapshot:

For mounting -o mount -v volumeID -dc Destination Client Name -dpath Destination Path are mandatory options.

E:\commandline>qoperation snap -v 128 -o "mount" -dc "client1" -dpath "/mpath"

Example for mounting multiple snapshots:

For mounting -o mount -v volumeID -dc Destination Client Name -dpath Destination Path are mandatory options.

E:\commandline>qoperation snap -v 128 -v 129 -o "mount" -dc "client1" -dpath "/mpath1" -dpath "/mpath2"

Unmounting Snapshots

Single Snapshot

This command allows you to unmount single snapshot.

qoperation snap [-cs commserver] -o unmount [-cid Commcell Id] -v Volume Id [-dc Destination Client Name] [-dpath Destination Path] [-tf tokenfile] [-tk token] [-h]

Multiple Snapshots

This command allows you to unmount multiple snapshots.

qoperation snap [-cs commserver] -o ummount -v Volume Id1 -v Volume Id2 [-dc Destination Client Name] [-dpath Destination Path1] [-dpath Destination Path2]

In case of an error, an error code and the error description are displayed in the following format: "snap: Error errorcode: errordescription"

Options:

-cs CommServe host name
-o Operation to be performed on the snapshot
-cid CommCell Id
-v Volume Id
-dc Destination client name
-dpath Destination path
-tf Reads token from a file
-tk Token string
-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 for unmounting a single snapshot:

For unmounting -o unmount -v volumeID are mandatory options.

E:\commandline>qoperation snap -v 128 -o "unmount"

Example for unmounting multiple snapshots:

For unmounting -o unmount -v volumeID are mandatory options.

E:\commandline>qoperation snap -v 128 -v 129 -o "unmount" -dc "client1" -dpath "/mpath1" -dpath "/mpath2"

Command line does not support revert or delete operations.