Command Line Configuration - UNIX/Linux File Systems

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

Backup Set Configuration

Use the following qcommands to configure backup sets for the Unix File System iDataAgent:

qcreate backupset
Description

This command creates a new backup set under the given client and agent.

The qcreate backupset command also allows the user to create default backup sets and on-demand backup sets. The default subclient created under the backup set can also be associated with a storage policy. If a storage policy name is not included, the subclient remains unassigned.

Upon successful completion, qcreate backupset displays the message "Created backupset successfully" on the command prompt. In case of an error, an error code and description are displayed as: "backupset: Error errorcode: errordescription"

Usage
qcreate backupset -c client -a dataagenttype -i instance -n backupset [-sp storagepolicy] [-t NORMAL|DEFAULT|ONDEMAND] [-tf tokenfile] [-tk token] [-af Argument Filepath] [-h]
Options

-c

Client computer name

-a

Agent type installed on client computer (see Argument Values - Agent Types)

-i

Instance name, required for certain agents

-n

Name of the backup set to be created

-t

Type of backup set (NORMAL, DEFAULT, or ONDEMAND)

-sp

Storage policy name with which default subclients are to be associated

-tf

Reads token from a file

-tk

Token string

-af

Reads arguments from a file

-h

Displays help

Argument File

client

Client computer name

dataagent

Agent type installed on client computer (see Argument Values - Agent Types)

backupset

Backup set name to be created

sp

Storage policy name to be associated with all subclients in the backup set

backupsettype

Backup set type (NORMAL, DEFAULT, or ONDEMAND)

compressionat

Compression at client or MediaAgent (CLIENT|MA)

networkagents

Number of network agents

prebackup

Prebackup command name

postbackup

Postbackup command name

prescan

Prescan command name

postscan

Postscan command name

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.

qdelete backupset
Description

This command deletes a given backup set.

When the backup set to be deleted contains archived data, the command asks the user to confirm the deletion. This prevents the user from accidentally removing backup sets that may have archive jobs. If you want to skip the confirmation prompt, you can use the "-skc" option.

Upon successful completion, the qdelete backupset command displays the message "Deleted backupset successfully" on the command prompt. In case of an error, an error code and description are displayed as: "backupset: Error errorcode: errordescription"

Usage
qdelete backupset -c client -a dataagenttype -b backupset [-skc] [-tf tokenfile] [-tk token] [-af ArgumentFilepath] [-h]
Options

-c

Client computer name

-a

Agent type installed on client computer (see Argument Values - Agent Types)

-b

Name of the backup set to be deleted

-skc

Skips the confirmation prompt to delete the backup set if archived data is found on the backup set.

-tf

Reads token from a file

-tk

Token string

-af

Reads arguments from a file

-h

Displays help

Argument File

client

Client computer name

dataagent

Agent type installed on client computer (see Argument Values - Agent Types)

backupset

Backup set name to be deleted

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

Delete a backupset with name bs1 under client client1 and Agent MyDataAgent.

qdelete backupset -c client1 -a MyDataAgent -b bs1

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

    qoperation execute -af create_subclient_template.xml -appName 'File System' -clientName xxxxx -backupsetName xxxxx -subclientName xxxxx -storagePolicyName xxxxx -contentOperationType ADD -content/path 'xxxxx'

Modifying a Subclient
  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 'File System' -clientName xxxxx -backupSetName xxxxx -subclientName xxxxx -contentOperationType xxxxx -content/path 'xxxxx'

Renaming a Subclient
  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 'File System' -clientName xxxxx -backupSetName xxxxx -subclientName xxxxx -newName 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 parameter values.

    qoperation execute -af delete_subclient_template.xml -appName 'File System' -clientName xxxxx -backupSetName xxxxx -subclientName xxxxx

Getting Subclient Properties
  1. Download the get_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 get_subclient_template.xml -appName 'File System' -clientName xxxxx -backupSetName xxxxx -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

clientName

Name of the client computer.

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.

appName

Name of the application. In this case it would be 'File System'.

subclientname

Name of the subclient.

newName

New name of the subclient.

enableBackup

Option to enable/disable backup.

Valid values are True/False.

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 for transmission and then decrypt the data prior to storage on the media.

  • ENC_NONE, to disable data encryption.

networkAgents

Number of Network Agents.

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.

  • USE_STORAGE_POLICY_SETTINGS, to use the software compression options defined on the storage policy.

  • OFF, to disable software compression.

throttleNetworkBandwidth

The maximum network bandwidth per network agent (in megabytes per hour).

Valid values are 2-2147483647.

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.

Note

Use this parameter when the enableDeduplication parameter is set to "true".

dataBackupStoragePolicy/storagePolicyName

Name of the Storage Policy to be associated for backup.

expandSymbolicLinks

UNIX: The option to expand and back up the data paths in the symbolic links of the subclient content.

Valid values are True/False.

useGlobalFilters

Option to enable the use of global filters. Valid values are:

  • ON, to enable global filters for the subclient.

  • USE_CELL_LEVEL_POLICY, to enable the use of global filters if the Use Global Filters on All Subclients option is enabled on the Control Panel (Global Filters) dialog. If the option is disabled, USE_CELL_LEVEL_POLICY will disable global filters for the subclient.

  • OFF, to disable global filters.

useVSS

Option to enable/disable VSS for backing up the file system data.

Valid values are True/False.

vssOptions

Option to use VSS for all files or for locked files only. Valid values are:

  • USE_VSS_FOR_ALL_FILES, to use VSS snap for all files.

  • FOR_LOCKED_FILES_ONLY, to back up locked files.

useVSSForAllFilesOptions

Options available when you use VSS for all files. Valid values are:

  • FAIL_THE_JOB, to fail the backup job if VSS snap fails.

  • CONTINUE_AND_RESET_ACCESS_TIME, to reset access time of files when VSS snap fails. Select the Recursive scan method when you perform a backup.

  • CONTINUE_AND_DO_NOT_RESET_ACCESS_TIME, to not reset the access time of files when VSS snap fails.

useVSSForSystemState

Option to enable/disable VSS for backing up the system state.

Valid values are True/False.

backupSystemState

Option to enable/disable the back up of system state. This option should not be enabled in more than one subclient per backup set to avoid system state backup failures.

Valid values are True/False.

backupSystemStateforFullBkpOnly

The option to backup the system state only during full backups. This parameter is available when backupSystemState is set to True.

Valid values are True/False.

oneTouchSubclient

The option to enable/disable 1-Touch Recovery on Linux file system agents. 1-Touch Recovery can be enabled on only one subclient within a backup set.

Valid values are True/False.

postBackupCommand

Path to the post-process script that will be run after the backup.

postScanCommand

Path to the post-process script that will be run after the scan phase.

preBackupCommand

Path to the pre-process script that will be run before the backup.

preScanCommand

Path to the pre-process script that will be run before the scan phase.

runAs

Option to specify the user name who has permissions to run the pre-process and post-process scripts. Valid values are:

  • USE_IMPERSONATION, to specify a user with enough privileges to run the scripts. When using this value, you also need to provide the user credentials:

    -prepostUserName/userName <user name> -prepostUserName/password <password>
  • USE_LOCAL_SYS_ADMIN, to use the administrator account to run the scripts.

content/path

Location of the content to be backed up. This parameter must be used along with the 'contentOperationType' parameter, for example:

-contentOperationType <value> -content/path '<path value>'

Note the following:

  • If you want to specify a wildcard to the content path, you must add '\/\/" (back and forward slash) at the end of the path to enable the detection of wildcard characters:

    -content/path 'datapath*\/\/'

  • If you are using a UNC path to specify the subclient content, you must also use the 'impersonateUser/userName' and 'impersonateUser/password' parameters to provide the credentials of a user account that has the required privileges to access the network share (where the content resides).

content/excludepath

Location of the content to be excluded from backup. This parameter must be used along with the 'contentOperationType' parameter, for example:

-contentOperationType <value> -content/excludepath '<path value>'

content/includepath

Location of the content to be included in the backup from the excluded list. This parameter must be used along with the 'contentOperationType' parameter, for example:

-contentOperationType <value> -content/includepath '<path value>'

impersonateUser/userName

User name of the account that has the required privileges to access the data on a network share when specifying UNC paths for the subclient content.

impersonateUser/password

Password of the account that has the required privileges to access the network share. This parameter must be used along with the 'impersonateUser/userName' parameter.

contentOperationType

The type of operation to perform on the subclient content. The content is defined in the content parameters.

Valid values are:

  • ADD, to add content to the subclient.

  • OVERWRITE, to overwrite content for the subclient. When you use OVERWRITE, you must define all of the content parameters you want to keep. For example, to update the subclient content and keep an existing exclusion defined for your content, you must use the following parameters in your command:

    -contentOperationType OVERWRITE -content/path new_path_value -content/excludepath existing_exclude_value

  • DELETE, to delete content from the subclient.

catalogAdditional

The option to collect file and system data. The data is used in the Build-Your-Own Reports feature and the File Level Analytics Report.

Valid values are True/False.

catalogACL

The option to catalogue ACLs (Access Control Lists).

Valid values are True/False.

deletePSTFileOnly

The option to delete the protected PST (personal storage table) files.

Valid values are True/False.

scanOption

The method used to scan files before performing a backup.

Valid values are:

  • CHANGE_JOURNAL, to use NTFS change journal to determine which files in the subclient are modified

  • OPTIMAL_SCAN, to scan a large number of files and folders for the backup (the system maintains a separate database to track changes in the files)

  • RECURSIVE_SCAN, to scan FAT volumes, UNC paths and volumes with no drive letter

preserveFileAccessTime

The option to preserve the file access time at the time of backup. This option may increase the time required to complete a backup.

Valid values are True/False.

checkArchiveBit

The option to reset the archive bit of every file backed up during incremental and differential backups.

Valid values are True/False.

retentionRule

The option to define the retention period for files deleted by a user. When a synthetic full backup is run at the end of the specified retention period, the deleted files are dropped from the synthetic full backup. Valid values are:

  • AFTER, to define the number of days to keep the deleted items available in the backup cycle. The number of days is defined in the daysToKeepItems parameter.

  • IMMEDIATELY, to drop the deleted items during the synthetic full backup.

  • NEVER, to never drop the deleted items during the synthetic full backup.

daysToKeepItems

The number of days to keep the deleted items available in the backup cycle. The number of days is calculated from the date the next incremental backup runs after the file is deleted. This parameter is available when the retentionRule parameter is set to AFTER.

keepAtLeastPreviousVersions

The number of previous file versions to retain after synthetic full backup jobs.

Valid values are 0-100.

Examples

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

Adding Content

To update the location for the subclient content, add the 'content/path' parameter to the following command:

qoperation execute -af update_subclient_template.xml -appName 'File System' -clientName client1 -backupSetName backupset1 -subclientName subclient1 -contentOperationType ADD -content/path '/etc'

Or, if you want to specify wildcards to the path, add '\/\/' at the end of the subclient path:

qoperation execute -af update_subclient_template.xml -appName 'File System' -clientName client1 -backupSetName backupset1 -subclientName subclient1 -contentOperationType ADD -content/path '/etc/test/[b-s]*\/\/'

Setting a Storage Policy

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

qoperation execute -af update_subclient_template.xml -appName 'File System' -clientName client1 -backupSetName backupset1 -subclientName subclient1 -dataBackupStoragePolicy/storagePolicyName sp1

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

Loading...