Defining Filters for a Subclient (VMware command line)

You can use the command line to define subclient filters. Filters exclude virtual machines that would otherwise be included based on automatic discovery rules for subclient content.

You can also filter virtual machines from subclient content based on the VM name or properties of VMs, such as power status, notes, or custom attributes.

  1. Download the update_subclient_filters_template.xml file and save it on the computer where the command will be executed.

  2. Log in to the CommServe host using the qlogin command.

  3. You can filter a single virtual machine directly from the command line. For example, to create a filter for VM02, execute the following command from the software_installation_directory/Base folder after substituting the other parameter values:

    qoperation execute -af $[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]
    
  4. You can filter one or more VMs by editing the .xml file:

    1. Open the .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, to exclude 3 virtual machines (VM001, VM002 and VM003), include the following lines 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 after substituting the other parameter values:

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

Examples

The following examples show how to create filters based on VM properties.

  • Filter Based on Power On State

    On the command line, go to the software_installation_directory/Base folder, and type the command after substituting the parameter values.

    qoperation execute -af 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 Based on Notes

    On the command line, go to the software_installation_directory/Base folder, and type the command after substituting the parameter values.

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

  • Filter Based on Custom Attributes

    On the command line, go to the software_installation_directory/Base folder, and type the command after substituting the parameter values.

    qoperation execute -af update_subclient_filters_template.xml appName '$[Virtual Server]' -clientName $[xxxxx] -instanceName $[xxxxx] -backupsetName $[xxxxx] -subclientName $[xxxxx] -vmFilter/children/displayName $[resize] -vmFilter/children/type $[VMCustomAttribute] -vmFilterOperationType $[ADD​]

Page contents

×

Loading...