Defining Filters for a Subclient from Command Line Interface (Microsoft Hyper-V)

Use XML to define filters to a subclient. Run the operation from the command line, or automate configuration by combining command line operations in a script.

You can include the XML parameters in the xml file, or you can specify them on the command line when they frequently change. For more information on command line parameters and XML elements, see Command Line - Syntax.

Before You Begin

Log on to the CommServe host using qlogin command. For instructions, see Qlogin.

For information on supported XML parameters, see Available XML Parameters for Subclient Configuration.

Procedure

  1. Download the update_subclient_filters_template.xml file to the computer where you will run the command.

  2. To exclude a virtual machine (for example, VM02) from the subclient content, on the command line, go to the software_installation_directory/Base folder, and type the command (including values for the client, instance, backup set, and subclient names):

    qoperation execute -af $[download_location]\update_subclient_filters_template.xml -appName '$[Virtual Server]' -clientName $[xxxxx] -instanceName $[xxxxx] -backupsetName $[xxxxx] -subclientName $[xxxxx] -vmFilter/children/displayName $[VM02] -vmFilter/children/type $[VMName] -vmFilterOperationType $[ADD]

Examples

Filter Multiple Virtual Machines
  1. Open the update_subclient_filters_template.xml file and add the following line under the <vmFilter> node for each virtual machine to be filtered:

    <children displayName="$[VM001]" equalsOrNotEquals="$[1]" type="$[10]" />
    

    For example, if you want to exclude 3 virtual machines (VM001, VM002 and VM003), it should look like this in the XML:

    <vmFilter>
        <children displayName="$[VM001]" equalsOrNotEquals="$[1]" type="$[10]" />
        <children displayName="$[VM002]" equalsOrNotEquals="$[1]" type="$[10]" />
        <children displayName="$[VM003]" equalsOrNotEquals="$[1]" type="$[10]" />
    </vmFilter>
    
  2. Execute the following command from the software_installation_directory/Base folder (including values for the client, instance, backup set, and subclient names):

    qoperation execute -af $[download_location]\update_subclient_filters_template.xml -appName '$[Virtual Server]' -clientName $[xxxxx] -instanceName $[xxxxx] -backupsetName $[xxxxx] -subclientName $[xxxxx]

Filter Virtual Machines Based on Power On Status

On the command line, go to the software_installation_directory/Base folder, and type the command (including values for the client, instance, backup set, and subclient names):

qoperation execute -af $[download_location]\update_subclient_filters_template.xml -appName '$[Virtual Server]' -clientName $[xxxxx] -instanceName $[xxxxx] -backupsetName $[xxxxx] -subclientName $[xxxxx] -vmFilter/children/displayName $[Powered On] -vmFilter/children/type $[VMPowerState] -vmFilterOperationType $[ADD]

Filter Virtual Machines Based on Notes

On the command line, go to the software_installation_directory/Base folder, and type the command (including values for the client, instance, backup set, and subclient names):

qoperation execute -af $[download_location]\update_subclient_filters_template.xml -appName '$[Virtual Server]' -clientName $[xxxxx] -instanceName $[xxxxx] -backupsetName $[xxxxx] -subclientName $[xxxxx] -vmContent/children/displayName $[Critical] -vmContent/children/type $[VMNotes] -vmFilterOperationType $[ADD]

×

Loading...