NetBackup™ for VMware Administrator's Guide
- Introduction
- Required tasks: overview
- Configuring RBAC roles for VMware administrators
- Notes and prerequisites
- VMware vSphere privileges
- Managing VMware servers
- About VMware discovery
- Add VMware servers
- Change resource limits for VMware resource types
- Configuring backup policies for VMware
- Backup options on the VMware tab
- Exclude disks tab
- Configuring a VMware Intelligent Policy
- About the Reuse VM selection query results option
- Use Accelerator to back up virtual machines
- Configuring protection plans for VMware
- Malware scan
- Instant access
- Instant rollback
- Continuous data protection
- Backing up virtual machines
- VM recovery
- VMware agentless restore
- Restoring Individual files and folders from VMware backups
- Using NetBackup to back up Cloud Director environments
- Recover VMware Cloud Director virtual machines
- Restore virtual machines with Instant Recovery
- Protecting VMs using hardware snapshots and replication
- Best practices and more information
- Troubleshooting VMware operations
- NetBackup logging for VMware
- Snapshot error encountered (status code 156)
- Appendix A. Configuring services for NFS on Windows
- About configuring services for NFS on Windows 2012 or 2016 (NetBackup for VMware)
- Appendix B. Backups of VMware raw devices (RDM)
Reducing the time required for VM discovery in a large vCloud environment
NetBackup backup policies for vCloud Director use query rules to automatically search and filter the vCloud environment. By default, the query rules search all the vCloud Director (vCD) servers in your environment. If the environment contains many vCloud servers with many vApps, VM discovery may take a long time. You can speed up VM discovery by limiting the search to specific vCloud servers or vApps.
The following is an example of a policy Query Builder rule that searches all vCloud servers and all vApps:
vmware:/?filter=vCDvApp Contains "vapp1"
With the Query Builder in the NetBackup web UI, the following is an example that uses OData keywords:
vmware:/?filter=Displayname contains(vcdvApp, 'vapp1')
To limit the search to particular servers or vApps, insert an additional vCloud expression in the Query Builder rule as explained in the following procedure.
To reduce the time required for VM discovery in a vCloud environment
- In the NetBackup web UI, open the vCloud Director policy.
- On the Clients tab of the policy, make sure Select automatically through VMware Intelligent Policy query and Enable Cloud Director integration are selected.
- In the Query Builder, click Advanced mode.
- Create one or more rules to search for VMs in specific vCloud Director servers or vApps.
Each query rule must begin on its own line.
You can use the following types of rules:
To search for VMs in a particular vCloud server
vmware://<vCloud_server>?filter=<filter>
To search for VMs in a particular vApp or vApp template
vmware:/vApp/vapp-<vApp_id>?filter=<filter>
vmware:/vAppTemplate/vappTemplate-<vAppTemplate_id>?filter=<filter>
To search for VMs in a particular vApp or vApp template on a particular vCloud server
vmware://<vCloud_server>/vApp/vapp-<vApp_id>?filter=<filter>
vmware://<vCloud_server>/vAppTemplate/vappTemplate- <vAppTemplate_id>?filter=<filter>
Example Query Builder rules for searching specific vCloud servers or vApps
For two or more search rules, you must enable multiple organizations for the policy.
In the policy VMware tab, locate and expand VMware advanced attributes.
Enable Multiple organizations per policy.
To use the nbdiscover command instead of the policy Query Builder, see the following topic:
Examples of the nbdiscover command for searching specific vCloud servers or vApps
In the NetBackup policy Query Builder, you can speed up discovery of vCloud VMs by using the following types of query rules:
To search for VMs in a particular vCloud server (note the double forward slash):
vmware://<vCloud_server>?filter=<filter>
Example rule:
vmware://vCD1.acme.com?filter=vCDvApp Contains "vapp1"
Example using OData keywords in the NetBackup web UI:
vmware://vCD1.acme.com?filter=contains(vcdvApp, 'vapp1')
NetBackup searches for VMs only in the vCD1.acme.com server.
To search for VMs in a particular vApp or vApp template (note the single forward slash):
vmware:/vApp/vapp-<vApp_id>?filter=<filter>
vmware:/vAppTemplate/vappTemplate-<vAppTemplate_id>?filter=<filter>
The vApp_id or vAppTemplate_id is the identifier on the end of the vCloud vApp href. You can use a vCloud Director REST API query to find the identifier.
For example, the following is a REST API query for a vApp that is named
acmvappvm7
:https://acmvm5.acme.com/api/query?type=adminVApp&filter= name==acmvappvm7
The following example is an excerpt from the API query Response:
href="https://acmvm5.acme.com/api/vApp/vapp-afaafb99 -228c-4838-ad07-5bf3aa649d42"
In this example, the vApp identifier for vApp
acmvappvm7
isafaafb99-228c-4838-ad07-5bf3aa649d42
. You can use this identifier in a NetBackup Query Builder rule as follows:vmware:/vApp/vapp-afaafb99-228c-4838-ad07-5bf3aa649d42 ?filter=Displayname Contains "prod"
Where
Displayname Contains "prod"
is an example filter for the rule.Example using OData keywords in the NetBackup web UI:
vmware:/vApp/vapp-afaafb99-228c-4838-ad07-5bf3aa649d42?filter=contains(displayName, 'prod')
To search for VMs in a particular vApp on a particular vCloud Director server:
vmware://<vCloud_server>/vApp/vapp-<vApp_id>?filter=<filter>
Example rule:
vmware://vCD1.acme.com/vApp/vapp-4c0d9722-80a4-4f19-b636-72ebf48e4e71 ?filter=Displayname Contains "prod"
Example using OData keywords in the NetBackup web UI:
vmware://vCD1.acme.com/vApp/vapp-4c0d9722-80a4-4f19-b636-72ebf48e4e71?filter=contains(displayName,'prod')
To search additional vCloud Director servers or vApps from the same backup policy, include additional query rules in the Query Builder.
Note:
To enter multiple rules in the Query Builder, you must be in Advanced mode.
Note:
Start each rule on its own line.
Example of two rules in the Query Builder:
vmware://vCD1.acme.com/vApp/vapp-4c0d9722-80a4-4f19-b636-72ebf48e4e71 ?filter=Displayname Contains "prod" vmware://vCD2.acme.com/vApp/vapp-5c0c9833-80a4-4f19-b636-72ebf48e4e63 ?filter=Displayname Contains "prod"
Examples using OData keywords in the NetBackup web UI:
vmware://vCD1.acme.com/vApp/vapp-4c0d9722-80a4-4f19-b636-72ebf48e4e71 ?filter=contains(displayName, 'prod') vmware://vCD2.acme.com/vApp/vapp-5c0c9833-80a4-4f19-b636-72ebf48e4e63 ?filter=contains(displayName, 'prod')
Use the following nbdiscover command format to search for VMs in specific vCloud servers or vCloud vApps:
nbdiscover "<vCloud_query>" - job_info "snaparg=enable_vCloud=1"
Example 1. Search for VMs in vCloud server vCD1.acme.com
only:
nbdiscover -noxmloutput "vmware://vCD1.acme.com?filter=DisplayName Contains 'prod1'" - job_info "snaparg=enable_vCloud=1"
The -noxmloutput option displays one VM per line.
Example 2. Search for VMs in a vCloud vApp that has the following vApp identifier:
4c0d9722-80a4-4f19-b636-72ebf48e4e71
nbdiscover -noxmloutput "vmware:/vApp/vapp-4c0d9722-80a4-4f19-b636 -72ebf48e4e71?filter=DisplayName Contains 'prod1'" - job_info "snaparg=enable_vCloud=1"
The following topic provides assistance in finding the vApp identifier:
See Example Query Builder rules for searching specific vCloud servers or vApps.
Example 3. Use two query rules to search for VMs prod1 and prod2 in a vCloud vApp:
nbdiscover -noxmloutput "vmware:/vApp/vapp-4c0d9722-80a4-4f19-b636 -72ebf48e4e71?filter=DisplayName Contains 'prod1'" "vmware:/vApp/ vapp-4c0d9722-80a4-4f19-b636-72ebf48e4e71?filter=DisplayName Contains 'prod2'" - job_info "snaparg=enable_vCloud=1,multi_org=1"
Note the two rules, each enclosed with double quotes and separated by a space, and the multi_org=1 option.