Ransomware attackers specifically target and attempt to destroy backup systems to increase the probability of payment. Hardening your system is critical. Please ensure you have reviewed your platform security using the Security Hardening Checklist
Cohesity

COHESITY Documentation

Explore our documentation to get started, discover products & new features, access troubleshooting guides, register sources, platforms support.

Products
Data Security Alliance
Visit Cohesity.com
Demos
Support
Blogs
Developers
Partner Portals
Cohesity Community
© 2026 Cohesity, Inc. All Rights Reserved.
Terms of Use|
Privacy Policy|
Legal|
  1. Home
  2. Veritas NetBackup™ for VMware Administrator's Guide
  3. Configure a VMware Intelligent Policy
  4. Examples for the NetBackup Query Builder
Veritas NetBackup™ for VMware Administrator's Guide

Examples for the NetBackup Query Builder

This topic applies to policy configuration for NetBackup for VMware. You can use the Query Builder to enter rules for the automatic selection of VMware virtual machines for backup.

The following table provides example query rules.

To use the Query Builder, you must click Select automatically through VMware Intelligent Policy query on the Clients tab.

Another topic is available on the difference between AND and OR in a query.

See AND vs. OR in queries.

Table: Query Builder examples

Example query

Query result when backup job executes

No query rules specified (Query pane is empty)

All virtual machines are added to the backup list. Exceptions are those that do not have a host name, or that have invalid characters in the display name.

See Effect of Primary VM identifier parameter on Selection column in Test Query results.

Displayname Contains "prod"

All virtual machines with the display names that contain the string "prod" are added to the backup list.

See Effect of Primary VM identifier parameter on Selection column in Test Query results.

powerstate Equal "poweredOn"

Any virtual machine that is turned on is added to the backup list.

VMGuestOS Equal "windows7Guest"

All virtual machines with a guest OS of Windows 7 are added to the backup list.

DisplayName AnyOf "grayfox7","grayfox9"

The virtual machines named "grayfox7"and "grayfox9" are added to the backup list. (Note that each value must be enclosed in its own quotes, with a comma in between.)

powerstate Equal "poweredOn"

AND Datastore Equal "Storage_1"

AND VMGuestOS Equal "rhel4Guest"

In datastore Storage_1: any virtual machine that is turned on and has a guest OS of Red Hat Linux 4 is added to the backup list.

vCenter Equal "vCenterServer_1"

AND ESXserver Contains "prod"

In the vCenter server vCenterServer_1, virtual machines that are in ESX servers with names containing "prod" are added to the backup list.

Cluster Equal "VMcluster_1"

AND ESXserver AnyOf "ESX_1","ESX_2","ESX_3"

AND VMHostName Contains "Finance"

In cluster VMcluster_1, all virtual machines with the host names that contain "Finance", in ESX servers ESX_1, ESX_2, ESX_3, are added to the backup list.

VMFolder StartsWith "Prod"

OR VMFolder NotEqual "VM_test"

For any folder whose name starts with "Prod" or whose name is not "VM_test", add its virtual machines to the backup list.

Examples with IsSet

See The IsSet operator in queries.

Datacenter Contains "prod" AND Tag Equal "Finance"

This query selects any virtual machine where the Datacenter contains "prod" and the user-specified tag is "Finance".

Datacenter Equal "prod" AND NOT Tag Equal "Test"

Selects virtual machines where Datacenter is "prod" but excludes any virtual machines that have the user-specified tag "Test".

Click Advanced to see the query rule in Advanced Mode. Only Advanced Mode supports the use of parentheses for grouping sets of rules.

See Using the Query Builder in Advanced Mode.

More Information

Configuring automatic virtual machine selection

Feedback

Was this page helpful?
Previous

AND vs. OR in queries

Next

The IsSet operator in queries

Feedback

Was this page helpful?