NetBackup™ for Hyper-V Administrator's Guide
- Introduction
- 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
- Configure Hyper-V Intelligent Policies
- NetBackup Hyper-V for SCVMM
- Windows Server failover cluster support
- Back up and restore Hyper-V
- Restoring individual Hyper-V files to a shared location on the virtual machine
- Use Accelerator to back up Hyper-V
- Best practices and more information
- Troubleshooting
- 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 policy
This topic describes how to use NetBackup commands to create a backup policy for Hyper-V on Windows Server 2016 or later. It includes features for Hyper-V on Windows Server 2016 or later: Block-level incremental backup and Accelerator. Note that this topic explains how to create a policy that selects virtual machines manually.
For a policy that automatically selects virtual machines through a query rule, see the following:
See Using NetBackup commands to create a Hyper-V Intelligent Policy.
The NetBackup commands for policy creation are in the following directory:
Windows: |
|
UNIX or Linux: |
|
Note:
To run virtual machine backups, a NetBackup client must be installed on the Hyper-V server.
To use NetBackup commands to create a Hyper-V policy
- Sign into the NetBackup primary server.
- Create a policy.
bppolicynew policyName
For example:
bppolicynew HVpolicy1
- Set the policy attributes.
To accept the default attributes, enter the following:
bpplinfo policyName -set -pt Hyper-V -use_virtual_machine 2 -hyperv_server "hyper-v_server" -fi 1 -snapshot_method "HV" -blkincr 1 -use_accelerator 1
To specify additional options, enter the following with -snapshot_method_args:
bpplinfo policyName -set -pt Hyper-V -use_virtual_machine 2 -hyperv_server "Hyper-V_server" -fi 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"
See Notes on Hyper-V policy attributes when you use the NetBackup commands.
- Create a policy schedule.
bpplsched policyName -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 policy1 -add Full -st FULL
- Select the virtual machines to back up.
bpplclients policyName -add VM_to_back_up
On this command, specify one virtual machine at a time. Specify the virtual machine's display name, host name, or GUID. You can use the Hyper-V management console to obtain the display name or GUID.
For example:
bpplclients policy1 -add prodvm1.acme.com
In this example, prodvm1.acme.com is the virtual machine to back up, including all of its local drives. Note: The backup selection is automatically set to ALL_LOCAL_DRIVES, which is the only option that is available for the Hyper-V policy type.
- Validate the policy.
bpclient -policy policyName -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.
The following topic contains examples of the nbrestorevm command to restore Hyper-V virtual machines: