Veritas NetBackup™ for VMware Administrator's Guide
- Introduction
- Required tasks: overview
- Notes and prerequisites
- Configure NetBackup communication with VMware
- Adding NetBackup credentials for VMware
- Validating VMware virtualization server certificates in NetBackup
- Configure NetBackup policies for VMware
- VMware backup options
- Exclude Disks tab
- Configure a VMware Intelligent Policy
- Reduce the size of backups
- Back up virtual machines
- Use Accelerator to back up virtual machines
- Restore virtual machines
- Restoring the full VMware virtual machine
- Virtual Machine Recovery dialog boxes (restore to original location)
- Virtual Machine Recovery dialogs boxes (restore to alternate location)
- Restoring VMware virtual machine disks by using Backup, Archive, and Restore
- Restoring VMware virtual machine disks by using NetBackup commands
- Restoring individual VMware virtual machine files
- Browse and search virtual machines for restore
- Restore virtual machines with Instant Recovery
- Use NetBackup for vCloud Director
- Virtual machine recovery dialog boxes for vCloud Director
- Best practices and more information
- Troubleshooting
- Appendix A. NetBackup commands to back up and restore virtual machines
- Using NetBackup commands to create a VMware policy
- Appendix B. Configuring services for NFS on Windows
- About configuring services for NFS on Windows 2012 or 2016 (NetBackup for VMware)
- About configuring services for NFS on Windows 2008 and 2008 R2 (NetBackup for VMware)
- Appendix C. The Reuse VM selection query results option
- Appendix D. Backup of VMware raw devices (RDM)
Using the nbrestorevm command to restore virtual machines into vSphere
To restore VMs, run the nbrestorevm command on the master server or recovery host. The command is located in the following directory:
UNIX and Linux:
/usr/openv/netbackup/bin/nbrestorevm
Windows:
install_path\NetBackup\bin\nbrestorevm.exe
The following nbrestorevm options are used in these examples:
- vmw
Required for all VMware virtual machine restores.
- C virtual_machine_to_restore
The VM name must match the type of name that was selected in the
option of the backup policy. For example, if the VM was backed up by its VM display name, specify the display name on the -C option.-R absolute_path_to_rename_file
Restores to a different location. The required entries in the rename file depend on the destination for the restore. See each example in this topic. Further notes are available on the rename file.
See The
nbrestorevm -R
rename file for restoring virtual machines.-O
Overwrites the VMs and associated resources if they already exist.
- S master_server
Specifies the master server that made the backup (if different from the current master).
-vmserver vCenter_server
Specifies a different vCenter server for the restore destination.
- vmproxy VMware_recovery_host
Specifies a different VMware recovery host (overrides the default backup host that backed up the VMs).
Note:
Storage lifecycle policies (SLPs) can use Auto Image Replication to replicate a virtual machine backup image to another NetBackup domain. To restore the virtual machine from the replicated image, you must include the -vmproxy option. Use -vmproxy to specify the backup host (access host) that is in the domain where the virtual machine was replicated.
-vmkeephv
Retains the hardware version upon recovery.
-vmid
Retains the BIOS UUID of the original virtual machine.
-vmInstanceId
Retains the Instance UUID of the original virtual machine (note that the Instance UUID is a vCenter specific unique identifier of a virtual machine).
-vmsn
Removes the network from the restored VM.
-vmvmxd
Restores the .vmdk files to the vmx datastore (the configuration datastore).
-vmpo
Turns on the VM after the restore.
Following are examples of nbrestorevm, for various restore destinations and options.
nbrestorevm - vmw - C VM_to_restore - O
nbrestorevm - vmw - C VM_to_restore - O -vmid
nbrestorevm - vmw - C VM_to_restore - O -vmInstanceId
nbrestorevm - vmw - C VM_to_restore - O - vmsn
nbrestorevm - vmw - C VM_to_restore - S master_server - O
nbrestorevm - vmw - C VM_to_restore - R absolute_path_to_rename_file -vmvmxd
For the -R rename file, create a text file with the following entry:
change datastore to new_vmx_datastore
where new_vmx_datastore specifies the path to the vmx datastore (configuration datastore) for the restored VM. After the restore, this datastore contains the .vmdk files of the restored VM.
Note:
In the rename file, the change line must end with a carriage return.
nbrestorevm - vmw - C VM_to_restore - R absolute_path_to_rename_file - vmserver vCenter_server
For the -R rename file, create a text file with the following entries. Replace the italicized values with the actual name for the restored VM and for the other vSphere objects in this list:
change vmname to new_display_name change esxhost to new_ESX_host change datacenter to /new_datacenter change folder to /new_datacenter/new_folder change resourcepool to new_datacenter/host/new_ESX_host/resources /new_resource_pool change datastore to new_vmx_datastore change /original_vmdk_path to /new_datastore/
Note:
In the rename file, each change line must end with a carriage return.
The last change entry in this list (change /original_vmdk_path to /new_datastore/) designates the following: the original path to the .vmdk file, and the new datastore for the .vmdk file of the restored VM. This change entry is required when you restore to a different datastore (unless you use the nbrestorevm - vmvmxd option). Depending on your VMware environment, this change entry may take the following form:
change /original_datastore/original_VM_folder/original_vmdk.vmdk to /new_datastore/
Note:
If the change vmdk directive specifies a different path for some of the VM's vmdk files, the other vmdk files are restored to their original datastore.
See The nbrestorevm -R
rename file for restoring virtual machines.
nbrestorevm - vmw - C VM_to_restore - R absolute_path_to_rename_file - vmserver vCenter_server
Create a rename file with the change entries listed for example G. Add the following change entry:
change network to new_network, new_network(n)
Note:
In the rename file, each change line must end with a carriage return.
nbrestorevm - vmw - C VM_to_restore - R absolute_path_to_rename_file - vmproxy VMware_recovery_host - vmpo
The - vmpo option turns on the restored VM.
Include the following in the rename file:
change esxhost to new_ESX_host
To restore the .vmdk files to a different datastore, include the following entry in the rename file:
change /original_vmdk_path to /new_datastore/
Note:
In the rename file, each change line must end with a carriage return, even if the file contains only one line.
Note:
The rename file may require other change entries, depending on your vSphere environment. See the available entries under example G.
Note:
Configure the recovery host as a VMware Access Host on the master server. Communication between the master server and the backup host or recovery host (client) should be established before the restore.
nbrestorevm - vmw - C VM_to_restore - R absolute_path_to_rename_file
Include the following in the rename file:
change esxhost to new_ESX_host
change datacenter to None
change folder to None
change resourcepool to /ha_datacenter/host/new_ESX_host/Resources
change datastore to new_datastore
change /original_vmdk_path to /new_datastore/
change network to new_network
Note:
For restore to a standalone ESX server, the resource pool entry must include the literal string ha-datacenter in the pool path.
Note:
The rename file may require other change entries, depending on your vSphere environment. See the available entries under example G.
nbrestorevm - vmw - C VM_to_restore - R absolute_path_to_rename_file - vmkeephv
Include the following in the rename file:
change resourcepool to /new_datacenter/host/cluster/resources/new_resource_pool
Note:
The rename file may require other change entries, depending on your vSphere environment. See the available entries under example G.
For further descriptions of the nbrestorevm options, see the command's man page or the NetBackup Commands Reference Guide.
The following topics contain additional information:
See Logs for troubleshooting the nbrestorevm command.
See The nbrestorevm -R
rename file for restoring virtual machines.
See Using the nbdiscover command to search the virtual environment.
See Using the nbrestorevm command to restore virtual machines into vCloud Director.