Creating Storage Policies Using XML Files

Table of Contents

Overview

Storage policies act as channel for backup and restore operations. Its chief function is to map data from its original location to a physical media. After creating a storage policy you can configure it. The following sections describe using xml files for creating a storage policy and configuring various properties of a storage policy.

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

Run Command Line Operations

To run the command line operations, you can download the .xml file, update the relevant  XML parameters and then execute the following command from the software_installation_directory/Base folder.

qoperation execute −af <downloaded location>\template.xml

For example, to execute an xml file, template.xml located at 'c:\program files\software\base:

qoperation execute −af c:\program files\software\base\template.xml

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

Available Parameters for Storage Policy Configuration

The following table displays all the parameters you can use with the commands. 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>

Element Description Parent Element
copyName Name of the storage policy copy to be created. App_CreateStoragePolicyReq
storagePolicyName Name of the storage policy to be created. App_CreateStoragePolicyReq
numberOfStreams The number of streams available to perform backup or restore operations for all the subclients which use the storage policy. App_CreateStoragePolicyReq
storagePolicyName Name of the storage policy which you want to use for all incremental backups. incrementalStoragePolicy
storagePolicyName Name of the global deduplication policy. useGlobalPolicy
hardWareCompression To enable hardware compression, set the value to 1. By default, it is disabled. storagePolicyCopyInfo
enableSnapshot Option to create a storage policy with primary snap copy. If you want to perform the SnapVault or SnapMirror operations using NetApp files, you must create a storage policy with primary snap copy.

Valid values are: 1 (enable) and 0 (disable).

StoragePolicyFlags
libraryName Name of the default library used by storage policy.

You must use drivePoolName and the spareMediaGroupName parameters when creating storage policies for Plug and Play libraries.

library
mediaAgentName Name of the MediaAgent that is used to create storage policy. mediaAgent
drivePoolName Drive pool name of a tape library for storage policy. drivePool
spareMediaGroupName Scratch pool name of a tape library for storage policy. spareMediaGroup
retainArchiverDataForDays Number of days to retain the Archiver data of the primary copy.

For infinite retention specify -1.

retentionRules
retainBackupDataForCycles Number of backup cycles to retain the data of the primary copy

For infinite retention specify -1.

retentionRules
retainBackupDataForDays Number of backup days to retain the data of the primary copy

For infinite retention specify -1.

retentionRules
jobs Number of jobs that needs to be retained for for Snap Vault or Snap Mirror copies. retentionRules
jobBasedRetention Job based retention criteria for Snap Vault or Snap Mirror copies. retentionFlags
name Name of the OnCommand Unified Manager Server.

If you want to perform the SnapVault or SnapMirror operations using NetApp files, you must create a storage policy associated with a OnCommand Unified Manager.

dfmServer

Creating Storage Policy Associated with a OnCommand Unified Manager

If you want to perform the snap vault or snap mirror operations using NetApp filers, you must create a storage policy associated with a OnCommand Unified Manager.

  1. Download the SP_creation.xml file and save it on the computer from where the command will be executed.
  2. Before running the command, review the Available Parameters for Storage Policy Configuration.
  3. Execute the following command from the <software_installation_directory>/Base folder after substituting the parameter values.

    qoperation execute -af <downloaded location>\SP_creation.xml -storagePolicyName xxxx -libraryName xxxxx -mediaAgentName xxxxx -enableSnapshot 1 -dfmServer/name xxx

    For example, to create a storage policy with name SP1 that is associated with a OnCommand Unified Manager server1, execute following command:

    qoperation execute -af <downloaded location>\SP_creation.xml -storagePolicyName SP_GDSP -libraryName Lib1 -mediaAgentName MA1 -enableSnapshot 1 -dfmServer/name server1