The basics of a NetBackup query rule
For automatic virtual machine selection, NetBackup uses query rules to determine which VMware virtual machines to select for backup. You create the rules in the Query Builder, on the Clients tab of the policy.
Note:
In the NetBackup web UI, you must use OData keywords and OData operators in query rules:
A query rule consists of the following:
A keyword, such as Displayname or Datacenter (many keywords are available).
For example: For automatic selection of the virtual machines with the display names that contain certain characters, you need the Displayname keyword in the rule.
An operator, such as Contains, StartsWith, or Equal.
The operator describes how NetBackup analyzes the keyword. For example: Displayname StartsWith tells NetBackup to look for the display names that start with particular characters.
Values for the keyword.
For the Displayname keyword, a value might be "prod". In that case, NetBackup looks for the virtual machines that have the display names that include the characters prod.
An optional joining element (AND, AND NOT, OR, OR NOT) to refine or expand the query.
The policy uses these elements to discover and select virtual machines for backup.
Table: Examples of rules contains the examples of rules.
Table: Examples of rules
Rule | OData rule * | Description |
|---|---|---|
Displayname Contains "vm" | contains(displayName, 'vm') | NetBackup selects the virtual machines that have the characters |
Displayname EndsWith "vm" | endswith(displayName, 'vm') | NetBackup selects the virtual machines that have the characters |
Datacenter AnyOf "datacenter1","datacenter2" | datacenter in ('datacenter1','datacenter2') | NetBackup selects the virtual machines that use datacenter1 or datacenter2. |
Powerstate Equal poweredOn | powerState eq 'poweredOn' | NetBackup selects only the virtual machines that are currently turned on. |
Powerstate Equal poweredOn AND Tag Equal "Production" | powerState eq 'poweredOn' and tagName eq 'Production' | NetBackup selects only virtual machines that are currently powered on with the "Production" tag. |
* Use OData keywords only when you build queries with the NetBackup web UI. | ||