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. NetBackup™ for VMware Administrator's Guide
  3. Appendix A. NetBackup commands to back up and restore virtual machines
  4. Query format and examples for searching virtual machine backups
NetBackup™ for VMware Administrator's Guide

Query format and examples for searching virtual machine backups

From the primary server, the nbdiscover command can search virtual machine backups based on a query rule. Compose the query manually and enclose it in double quotes.

For example: Search for backups of the virtual machines that have "vm1" as their display names:

nbdiscover "vmsearch:/;reqType=search?filter=VMDisplayName Equal 'vm1'"

Table: Query format with examples

Element

Description

vmsearch:/

Specifies that the query searches virtual machine backups.

reqType

The request type. The following request types are supported:

  • search

    Specifies that the query is used for search. Requires a query rule

  • browse

    Displays the hierarchy of the virtual machines that were backed up. Requires the viewType.

  • listFields

    Lists the supported field names and their attributes.

  • listOps

    Lists the operations that a field supports. Requires the fieldName option.

viewType

Specifies the type of hierarchical view (vcloud or vsphere). Used with the browse option.

Example - Show the hierarchy of vCloud:

nbdiscover "vmsearch:/;reqType=browse;viewType=vcloud"

Example - Show the hierarchy of vSphere:

nbdiscover "vmsearch:/;reqType=browse;viewType=vsphere"

fieldName

Specifies the name of the field for which supported operators are to be listed. Used with the listOps.

Example - List supported operators for VMDisplayName

nbdiscover "vmsearch:/;reqType=listOps;fieldName=VMDisplayName"

filter

The query rule. nbdiscover searches virtual machine backups based on the rule.

Example:

nbdiscover -noxmloutput "vmsearch:/;reqType=search?filter=ScheduleType Equal '0'"

See the following examples with sample output.

Example 1: Search for the virtual machines that have full backups.

nbdiscover -noxmloutput "vmsearch:/;reqType=search?filter=ScheduleType Equal '0'"

+ "demovm%20(8c879391-2917-4416-9373-bea7ec727717)"
+ "smallvm2%20(10a16222-8532-46ff-bd6a-9661240392f4)"

Example 2: Search backups of the virtual machines that have the display names that contain "vm".

nbdiscover -noxmloutput "vmsearch:/;reqType=search?filter=VMDisplayName Contains 'vm'"

+ "demovm%20(8c879791-2917-4428-9373-bea7ec727717)"
+ "small_vm%20(33e85579-7279-411f-b2f9-9fb570583911)"
+ "small_vm_percent_%25%20(33e85579-7279-411f-b2f9-9fb570583911)"

Example 3: Search for backups of the vCloud virtual machines that have "test" in their vApp names.

nbdiscover -noxmloutput "vmsearch:/;reqType=search?filter= vCDvApp Contains 'test'"

+ "demovm%20(8c879791-2917-4428-8213-bea7ec727717)"
+ "small_vm%20(61e83479-7246-411f-b1f9-9fb570546755)"
+ "small_vm_percent_%25%20(61e83479-7246-411f-b1f9-9fb570546755)"

Example 4: Search the virtual machine backups that occurred before 08/24/2012 11:05:56 AM. Specify the backup time in UTC.

nbdiscover -noxmloutput "vmsearch:/;reqType=search?filter=BackupTime Less '1345871512'"

+ "demovm%20(8c846791-2917-4428-9373-bea7ec727437)"
+ "small_vm%20(22e85813-7246-433f-b2f9-9fb570585387)"
+ "small_vm_percent_%25%20(22e85579-7246-433f-b2f9-9fb570585387)"

Example 5: Search backups for virtual machines where the vCloud organization is named "QA" and the vApp name contains "demo".

nbdiscover -noxmloutput "vmsearch:/;reqType=search?filter=vCDOrg Equal 'QA' AND vCDvApp Contains 'demo'"

+ "demovm%20(8c879791-2917-4428-9373-bea7ec727717)"

Example 6: Show the hierarchy of a vCloud environment. The output is in XML.

nbdiscover "vmsearch:/;reqType=browse;viewType=vcloud"

<Start Iteration="vmsearch:/;reqType=browse;viewType=vcloud">
<VCDSERVER>
     <NBU>
     <NAME>hypervm1.acme.com</NAME>
     </NBU>
     <VCDORG>
          <NBU>
          <NAME>Test Cloud</NAME>
          </NBU>
          <VCDORGVDC>
                <NBU>
                <NAME>Test Org</NAME>
                </NBU>
                <VCDVAPP>
                       <NBU>
                       <NAME>TestvApp</NAME>
                       </NBU>
                </VCDVAPP>
          </VCDORGVDC>
     </VCDORG>
</VCDSERVER>
<StatusMsg NBUStatus="0" Severity="0"></StatusMsg>
</START>

This search found the following:

  • A vCloud Director server: hypervm1.acme.com

  • An organization: Test Cloud

  • A virtual datacenter: Test Org

  • A vApp: TestvApp

Feedback

Was this page helpful?
Previous

Logs for troubleshooting the nbrestorevm command

Next

Allowing other servers or clients to restore virtual machines

Feedback

Was this page helpful?