Command Line Interface - Configuration - OnePass for Mac File System

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

Agent Configuration

  1. Download the update_agent_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_agent_template.xml -appName 'File System' -clientName 'xxxxx' -agentArchivePropertiesFlag true

Available Parameters for Agent 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:

qoperation execute -af <template XML file> -<parameter name> <value>

Parameter

Description of Parameter Values

agentArchivePropertiesFlag

The option to enable archiving for the agent. Valid values are True/False.

appName

The name of the application. Valid values are 'File System'.

clientName

The name of the client.

Backup Set Configuration

Use the following qcommands to configure backup sets.

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 -enableOnePass true

Modifying 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 -enableOnePass true -enableArchivingWithRules true -fileSizeGreaterThan 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>

Note

The default retention setting for user or archived deleted files is set to Immediately when you enable OnePass from the command line.

Parameter

Description and Parameter Values

clientName

The name of the client.

backupsetName

The name of the backup set. If the backup set name is not specified, the default backup set is used.

appName

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

subclientname

The name of the subclient.

enableOnePass

The option to enable OnePass.

Valid values are True/False.

enableArchivingWithRules

The option to enable archiving with archive rules. This parameter is available when the enableOnePass parameter is set to True. Parameters under the <diskCleanupRules> element are available when enableArchivingWithRules is set to True.

Note

Once the enableArchivingWithRules parameter is set to True, the enableOnePass parameter cannot be set to False.

Valid values are True/False.

startCleaningIfLessThan

The option to stop archiving files based on the percentage of available free space on the volume. To ignore this rule, enter 100.

Valid values are 0-100.

stopCleaningIfupto

The option to archive files based on the percentage of available free space on the volume. To ignore this rule, enter 100.

Valid values are 0-100.

fileAccessTimeOlderThan

The option to archive files whose access time is older than the number of days specified. To ignore this rule, enter 0.

Valid values are 0-1000.

fileModifiedTimeOlderThan

The option to archive files whose modified time is older than the number of days specified. To ignore this rule, enter 0.

Valid values are 0-1000.

fileSizeGreaterThan

The option to archive files whose size is greater than the kilobytes specified. To ignore this rule, enter 0.

Valid values are numbers greater than zero.

maximumFileSize

The option to archive files whose size is lesser than or equal to the kilobytes specified. To ignore this rule, enter 0.

Valid values are numbers greater than 0.

afterArchivingRule

The option to replace the archived file with a stub or to delete the archived file.

Valid values are:

  • REPLACE_FILE_WITH_STUB

  • DELETE_THE_FILE

archiveReadOnlyFiles

The option to archive the read only files.

Valid values are True/False.

backupFilesQualifiedForArchive

The option to back up only the files that meet the archive rules.

Valid values are True/False.

useNativeSnapshotToPreserveFileAccessTime

The option to use a native snapshot to preserve the file access time.

Valid values are True/False.

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.

deleteArchiveJob

The option to define the retention period for files deleted by an archiving job. 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 deleteArchiveJobAfterDays parameter.

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

deleteArchiveJobAfterDays

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 deleteArchiveJob parameter is set to AFTER.

Valid values are 0-999.

userDeletedStubRetention

The option to define the retention period for stubs 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 userDeletedStubRetentionDays parameter.

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

userDeletedStubRetentionDays

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 userDeletedStubRetention parameter is set to AFTER.

Valid values are 0-999.

Examples

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

Setting the File size greater than n KB Archiving Rule

To archive files with file size greater than a specified value, add the 'fileSizeGreaterThan' parameter to the following command:

qoperation execute -af update_subclient_template.xml -appName 'File System' -clientName client1 -backupSetName backupset1 -subclientName subclient1 -enableOnePass true -enableArchivingWithRules true -fileSizeGreaterThan 1024

Setting the File access time older than n days Archiving Rule

To archive files which have not been modified for a specified number days, add the 'fileAccessTimeOlderThan' parameter to the following command:

qoperation execute -af update_subclient_template.xml -appName 'File System' -clientName client1 -backupSetName backupset1 -subclientName subclient1 -enableOnePass true -enableArchivingWithRules true -fileAccessTimeOlderThan 180

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