Loading...

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
description Description of the storage policy. 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
encryptData Enables data encryption options on the storage policy copy.

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

dataEncryption
encryptionType The cipher to use for data encryption.

Valid values are:

  • DES3
  • AES
  • Blowfish
  • GOST
  • Serpent
  • TwoFish
dataEncryption
encryptionKeyLength The key length to use with the cipher in the CipherType parameter.

Valid values for:

  • 3-DES cipher
    • 192
  • AES (Rijndael), GOST, Blowfish, Serpent, and TwoFish ciphers
    • 128
    • 256
dataEncryption
storeKeyOnMedia To enable direct media access via media password option.

1 (enable), 0 (disable), and 2 (to use the existing setting).

dataEncryption
auxCopyReencryptData Re-encrypts data using selected cipher.

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

copyFlags
autoAddDataPaths Automatically adds the alternate data paths for a shared library. copyFlags
enableGlobalDeduplication To create a global deduplication policy. StoragePolicyFlags
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
enableDeduplication To enable the deduplication on a storage policy.

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

dedupeFlags
enableClientSideDedup To enable Source-Side deduplication on a storage policy.

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

dedupeFlags
enableDASHFull To enable DASH Full (Accelerated Synthetic Full backups) for a storage policy.

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

dedupeFlags
pauseAndRecoverCurrentDDB To recover the deduplication database (DDB) when the current DDB is unavailable. dedupeFlags
automaticallyPauseAdnRecoverDDB To recover DDB automatically using DDB backup.

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

dedupeFlags
useGlobalDedupStore Enable to use global deduplication database for a storage policy. dedupeFlags
hostGlobalDedupStore Enable to host the global deduplication database. dedupeFlags
mediaAgentName Name of the MediaAgent where deduplication database is located. mediaAgent/maInfoList
path Deduplication Database Location on a MediaAgent accessPath/subStoreList
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

See Also: Available Elements for Modifying Data Encryption Properties

Creating a Storage Policy

Storage Policy creation using xml is defined under the root tag App_CreateStoragePolicyReq. Information about the retention settings, library name and MediaAgent name is specified under the storagePolicyCopyInfo tag. Nested under the storagePolicyCopyInfo tag is the retentionRules tag which defines the basic retention rules.

  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 <download location>\SP_creation.xml -storagePolicyName xxxxx -libraryName xxxxx -mediaAgentName xxxxx -retainArchiverDataForDays xx -retainBackupDataForCycles xx -retainBackupDataForDays xx -numberOfStreams xx

    Example

    To create a storage policy with name “SP1”, Library name “Lib1”, MediaAgent Name “MA1”, and infinite retention period.

    qoperation execute -af <download location>\SP_creation.xml -storagePolicyName SP1 -libraryName Lib1 -mediaAgentName MA1

    To create a storage policy with name “SP2”, Library name “Lib2”, MediaAgent Name “MA2” and retain archiver data in the primary copy for 5 days, retain backup data in the primary copy 5 days and 10 cycles.

    qoperation execute -af <downloaded location>\sp_copycreation.xml -storagePolicyName SP2 -libraryName Lib2 -mediaAgentName MA2 -retainArchiverDataForDays 5 -retainBackupDataForCycles 10 -retainBackupDataForDays 5

    To create a storage policy with name “SP2”, Library name “Lib2”, MediaAgent Name “MA2” and specify the data retention time for a specific job.

    qoperation execute -af <downloaded location>\sp_copycreation.xml -storagePolicyName SP2 -libraryName Lib2 -mediaAgentName MA2 -retainArchiverDataForDays 5 -retainBackupDataForCycles 10 -retainBackupDataForDays 5

    To create a storage policy with two data paths:

    • To create a  storage policy with name “SP2”, MediaAgent with name “MA1” and “MA2”, disk library with name “DiskLib2”.

      qoperation execute -af <downloaded location>\SP_creation.xml -storagePolicyName SP2 -libraryName DiskLib2 -mediaAgentName MA1 -retainArchiverDataForDays 5 -retainBackupDataForCycles 10 -retainBackupDataForDays 10 -numberOfStreams 15 -dataPathProperties/operationFlags/addDataPath true -dataPathProperties/library/libraryName DiskLib2 -dataPathProperties/mediaAgent/mediaAgentName MA2

    • To create a storage policy with name “SP2”, MediaAgent with name “MA1” and “MA2”, tape library with name “TapeLib2”, drive pool with name “Drivepool1” and “Drivepool2”, spare media group with name “Sparemedia1”, scratch pool with name “Scratchpool1”.

      qoperation execute -af <downloaded location>\SP_creation.xml -storagePolicyName SP2 -libraryName TapeLib2 -mediaAgentName MA1 -drivePoolName Drivepool1 -spareMediaGroupName Sparemedia1 -retainArchiverDataForDays 5 -retainBackupDataForCycles 10 -retainBackupDataForDays 10 -numberOfStreams 15 -dataPathProperties/operationFlags/addDataPath true -dataPathProperties/library/libraryName TapeLib2 -dataPathProperties/mediaAgent/mediaAgentName MA2 -dataPathProperties/drivePool/drivePoolName Drivepool2 -dataPathProperties/scratchPool/scratchPoolName Scratchpool1

Creating Deduplication Enabled Storage Policy

To create a storage policy by enabling deduplication using single deduplication database (DDB) the xml tags nested within the storagePolicyCopyInfo tag are retentionRules, commonPdconfig, maInfoList and subStoreList.

  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 xxxxx -libraryName xxxxx -mediaAgentName xxxxx -retainArchiverDataForDays xx -retainBackupDataForCycles xx -retainBackupDataForDays xx -maInfoList/mediaAgent/mediaAgentName xxxxx -path xxxxx -enableDASHFull 1 -enableDeduplication 1

    Example

    To create a storage policy SP2 with Library Lib1, MediaAgent MA1, the SIDB store located on MA2, and SIDB path “c:\SIDB”.

    qoperation execute -af <downloaded location>\SP_creation.xml -storagePolicyName SP2 -libraryName Lib1 -mediaAgentName MA1 -retainArchiverDataForDays 5 -retainBackupDataForCycles 10 -retainBackupDataForDays 5 -maInfoList/mediaAgent/mediaAgentName MA2 -path c:\SIDB -enableDASHFull 1 -enableDeduplication 1

Enabling an Incremental Storage Policy

You can create a standard storage policy for all the Full backups and an incremental storage policy for incremental and differential backups.
  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 -incrementalStoragePolicy/storagePolicyName xxxx -mediaAgentName xxxx -libraryName xxxx -retainArchiverDataForDays xx -retainBackupDataForCycles xx -retainBackupDataForDays xx

    Example

    To create storage policy with name "SP_Incremental" and use "SP1" storage policy as an incremental storage policy.

    qoperation execute -af <downloaded location>\SP_creation.xml -storagePolicyName SP_Incremental -incrementalStoragePolicy/storagePolicyName SP1 -mediaAgentName MA1 -libraryName Lib1 -retainArchiverDataForDays 5 -retainBackupDataForCycles 10 -retainBackupDataForDays 5

    All the incremental backups are directed through the SP1 storage policy.

Creating a Global Deduplication Policy

You can create a global deduplication policy to deduplicate data from multiple storage policies against each other. When a global deduplication policy is created, a storage policy associated with it is also created with the Policy as name suffix.

  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 xxxxx -libraryName xxxxx -mediaAgentName xxxxx -maInfoList/mediaAgent/mediaAgentName xxxxx -path xxxxx -enableGlobalDeduplication 1 -hostGlobalDedupStore 1 -enableDASHFull 1 -enableDeduplication 1

    For example, to create a global deduplication storage policy with name SP_GDSP, Library Lib1, MediaAgent MA1, the SIDB store located on MA2, and SIDB path “c:\SIDB”, execute following command:

    qoperation execute -af <downloaded location>\SP_creation.xml -storagePolicyName SP_GDSP -libraryName Lib1 -mediaAgentName MA1 -maInfoList/mediaAgent/mediaAgentName MA2 -path c:\SIDB -enableGlobalDeduplication 1 -hostGlobalDedupStore 1 -enableDASHFull 1 -enableDeduplication 1

    You can use the SP_GDSP to enable global deduplication for any storage policy created in the CommCell.

Creating a Global Deduplication Enabled Storage Policy

Once you create a global deduplication policy, you can use it to enable global deduplication for any storage policy.

  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 -useglobalpolicy/storagePolicyName xxxx -enableDeduplication 1 -useGlobalDedupStore 1 -enableDASHFull 1

    For example, to create a global deduplication enabled storage policy, with name SP1, that is using SP_GDSP as a global deduplication policy, execute following command:

    qoperation execute -af <downloaded location>\SP_creation.xml -storagePolicyName SP1 -useglobalpolicy/storagePolicyName SP_GDSP -enableDeduplication 1 -useGlobalDedupStore 1 -enableDASHFull 1

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

Creating Storage Policy with Partitioned DDB

A Partitioned Deduplication Database (DDB) can improve the scalability of the database by splitting the database on different disks and/or MediaAgents.

  1. Download the SP_MultipleDDb_Creation.xml file and save it on the computer from where the command will be executed.
  2. Edit the template and specify the deduplication database locations on different disks and/or MediaAgents.

    For example: To create a SIDB on MA1 and MA2 we edit following tag in template

    <DDBPartitionInfo>
        <maInfoList>
            <mediaAgent>
                <mediaAgentName>MA1</mediaAgentName>
            </mediaAgent>
        <subStoreList>
            <accessPath>
                <path>PATH1</path>
            </accessPath>
        </subStoreList>
        </maInfoList>
        <maInfoList>
            <mediaAgent>
                <mediaAgentName>MA2</mediaAgentName>
            </mediaAgent>
        <subStoreList>
            <accessPath>
                <path>PATH2</path>
            </accessPath>
        </subStoreList>
        </maInfoList>
    </DDBPartitionInfo>

  3. Execute the following command from the software_installation_directory/Base folder:

    qoperation execute -af <downloaded location>\SP_MultipleDDb_Creation.xml -storagePolicyName xxx -libraryName xxx -mediaAgentName xxx -retainArchiverDataForDays xx -retainBackupDataForCycles xx -retainBackupDataForDays xx  -enableDeduplication 1

Examples

The following example shows how to add a parameter for a command and creation of storage policy that uses:

DASH Full (Accelerated Synthetic Full backups)

qoperation execute -af <downloaded location>\SP_creation.xml -storagePolicyName SP1 -libraryName Lib1 -mediaAgentName MA1 -maInfoList/mediaAgent/mediaAgentName MA2 -path c:\SIDB -enableDASHFull 1 -enableDeduplication 1

10 backup cycles to retain the data of the primary copy

qoperation execute -af <downloaded location>\SP_creation.xml -storagePolicyName SP1 -mediaAgentName MA1 -libraryName Lib1 -retainBackupDataForCycles 10 -retainBackupDataForDays 5

5 backup days to retain the data of the primary copy

qoperation execute -af <downloaded location>\SP_creation.xml -storagePolicyName SP1 -mediaAgentName MA1 -libraryName Lib1 -retainBackupDataForCycles 10 -retainBackupDataForDays 5

5 backup days to retain the archive data of the primary copy

qoperation execute -af <downloaded location>\SP_creation.xml -storagePolicyName SP1 -mediaAgentName MA1 -libraryName Lib1 -  retainArchiverDataForDays 5 -retainBackupDataForCycles 10 -retainBackupDataForDays 5

15 streams for backup and restore operations

qoperation execute -af<download location>\SP_creation.xml -storagePolicyName SP1 -libraryName Lib1 -mediaAgentName MA1 -numberofstreams 15

hardware compression for a primary copy

qoperation execute -af <downloaded location>\SP_creation.xml -storagePolicyName SP1 -mediaAgentName MA1 -libraryName Lib1 -hardWareCompression 1

job based retention on a primary copy

qoperation execute -af <downloaded location>\SP_creation.xml -storagePolicyName SP1 -mediaAgentName MA1 -libraryName Lib1 -jobBasedRetention 1