Veritas NetBackup™ for Hyper-V Administrator's Guide
- Notes and prerequisites
- Configure NetBackup communication with Hyper-V
- Configure NetBackup policies for Hyper-V
- Backup options on the Hyper-V tab
- Hyper-V - Advanced Attributes
- Browse for Hyper-V virtual machines
- Configure Hyper-V Intelligent Policies
- NetBackup Hyper-V for SCVMM
- Windows Server failover cluster support
- Virtual machine maintenance after a restore
- Back up and restore Hyper-V
- Restoring individual files to a shared location on the virtual machine
- Use Accelerator to back up Hyper-V
- Best practices and more information
- NetBackup logs for Hyper-V and how to create them
- Errors during policy creation
- NetBackup status codes related to Hyper-V
- Appendix A. VSS backup method: Hyper-V online and offline backups
- Appendix B. Hyper-V pass-through disks
- Appendix C. NetBackup commands to back up and restore Hyper-V virtual machines
- Examples of nbrestorevm for restoring VMs to Hyper-V
Using NetBackup commands to create a Hyper-V Intelligent Policy
This topic describes how to use NetBackup commands to create a policy to back up virtual machines automatically through a query rule. It includes features for Hyper-V on Windows Server 2016: Block-level incremental backup and Accelerator.
The NetBackup commands for policy creation are in the following directory:
UNIX or Linux:
Run these commands on the NetBackup master server.
To run virtual machine backups, a NetBackup client must be installed on the Hyper-V server, and on the SCVMM server (if any).
To use NetBackup commands to create a Hyper-V policy for auto selection of VMs
- Create a policy.
- Set the policy attributes.
bpplinfo policy_name -set -pt Hyper-V -use_virtual_machine 2 -hyperv_server "Hyper-V_server" -fi 1 -application_discovery 1 -snapshot_method "HV" -blkincr 1 -use_accelerator 1 -snapshot_method_args "nameuse=1,Virtual_machine_backup=2, file_system_optimization=1,exclude_swap=1,drive_selection=0, snapact=3,hv_snapshot_consistency_level=0"
The -hyperv_server option specifies the Hyper-V host, Hyper-V cluster, or SCVMM server that contains the VMs to back up.
The option -snapshot_method "HV" specifies the WMI snapshot method for Hyper-V Server 2016. (-snapshot_method "Hyper-V_v2" specifies the VSS method, which does not support block-level incremental backup or Accelerator.)
The option -blkincr: 1 enables block-level incremental backup.
The option -use_accelerator: 1 enables Accelerator. (This option also enables BLIB.)
-snapshot_method_args is a comma-delimited list of keywords that define the Hyper-V snapshot and policy. The keywords and values for -snapshot_method_args are described in a separate topic:
- Create a policy schedule.
bpplsched policy_name -add sched_label -st sched_type
For the -st option, the available schedule types are FULL (full), INCR (differential incremental), or CINC (cumulative incremental). For example:
bpplsched p1_auto_select_VMs -add Full -st FULL
- To specify a Hyper-V server:
Specify the host that is to perform virtual machine discovery.
To specify a Hyper-V server:
bpplclients policy_name -add Hyper-V_server Hyper-V_server_hardware_type Hyper-V_server_OS
bpplclients Accel_policy_auto_select1 -add scvmmserver3 Windows-x64 Windows
In this example, the host to perform virtual machine discovery is scvmmserver3.
To specify a Hyper-V cluster:
bpplclients policy_name -add Hyper-V_cluster
To allow the policy to search all nodes of the cluster, you must set the
NetBackup Legacy Network Servicelogon to the domain user account.
To specify a System Center Virtual Machine Manager (SCVMM) that manages Hyper-V servers or clusters:
bpplclients p1_auto_select_VMs -add hvserver3 Windows-x64 Windows
To find the hardware type and operating system for your server, run the following on the NetBackup master server:
For further information, see the examples under bpplclients in the NetBackup Commands Reference Guide.
- Create a query rule to select virtual machines automatically.
bpplinclude policy_name -add "hyperv:/;server_type=value?filter=query_rule"
The possible values for server_type=value are the following (these values are not case-sensitive):
NetBackup discovers the VMs by communicating with the Hyper-V server or cluster. The Hyper-V server or Hyper-V cluster must contain the NetBackup client software.
NetBackup discovers the VMs by communicating with the SCVMM server. The SCVMM server (as well as each of the Hyper-V hosts) must contain the NetBackup client software.
bpplinclude Accel_policy_auto_select1 - add "hyperv:/;server_type=Scvmm?filter=Displayname Contains 'Production'"
This query rule selects from the virtual machines that an SCVMM server manages. This example selects only the virtual machines with the display names that contain the word "Production". Contains means that other characters can also appear in the display names.
For the filter options that you can use in a Hyper-V query rule, refer to the Field keywords in the following:
- Validate the policy.
bpclient -policy policy_name -validate - fi
If the policy successfully validates, no output appears. Otherwise, the following error occurs:
Error code 48 : client hostname could not be found
- Use the bpbackup command to start the backup.
For details on bpbackup, see the NetBackup Commands Reference Guide.
For a policy that lets you select virtual machines manually:
To test the bpplinclude query rule before you run the backup
- Run the following on the Hyper-V server or SCVMM server that is designated in the policy:
install_path\NetBackup\bin nbdiscover -noxmloutput "query filter=query_rule" -noreason
Where "query filter=query_rule" is the actual query to test. For example:
"hyperv:/;server_type=Hyperv?filter=Displayname Contains 'Production'"
A plus sign (+) appears before the virtual machines that the query rule selects for the backup: those virtual machines are included in the backup when the policy runs.
The virtual machines to be excluded from the backup appear with a minus sign (-).
The -noreason option omits explanations as to why the query excluded a virtual machine or why the query failed. For explanations, omit -noreason.
For more details on most of the command options, see the man page or the NetBackup Commands Reference Guide.