May 7, 2018
Hyper-V Backup Tips
Today, most technical specialists are aware of the necessity to back up physical servers and virtual machines (VMs). Performing VM backup in Microsoft’s Hyper-V virtual environment may not seem to be an easy task at first. If the backup process is not configured correctly, things could go wrong. That’s why you should be familiar with the best practices. This blog post reveals useful backup tips that can help you perform backup of Hyper-V virtual machines the right way, describing the features of NAKIVO Backup & Replication for reliable and efficient Hyper-V backup.
Perform backups at the host level rather than the guest level
Host-level backup is performed at the hypervisor level – the backup application captures the entire virtual machine, including all virtual disks and settings of other virtual devices such as network cards, processors, memory etc. These backups contain everything needed for recovery of the VM’s data. On the other hand, guest-level backup is similar to backup of a physical machine; agents are used, and only the data on the virtual disk volumes is backed up. Host-level backup consumes less computing resources than guest-level backup. Keeping runningHost-level backup is also easier to manage, which is especially important for large Hyper-V virtual infrastructures.
Use backup solutions that support backup of individual VMs rather than the entire Hyper-V host
Some software backs up the entire Hyper-V host, including all the VMs residing there. This approach is not convenient because some VMs are more important than others. For example, a VM created for testing purposes might not need to be backed up at all, whereas the VM that runs your business-critical order logs should be backed up every few hours. Backing up all the other VMs on the host would consume significantly more disk space. More progressive backup products are more flexible, allowing you to fine-tune which VMs you want to back up and when. They also allow you to back up different VMs in different repositories.
Use backup solutions that perform granular recovery
Granular recovery allows you to restore entire VMs as well as separate files or particular application objects (for example, Exchange emails, database tables, or Active Directory objects). Granular recovery saves time because there is no need to restore the entire VM when only a particular file or object must be recovered.
Keep the latest version of Hyper-V Integration Services on your VMs
Hyper-V Integration Services is a set of drivers as well as services that provide special interaction between the child VM and the Hyper-V host. When a running VM needs to be backed up, the Hyper-V host uses Integration Services to communicate with the child VM and ensures data consistency with the Volume Shadow Copy Service (VSS). Without these services, the system and applications inside the VM cannot be aware that the backup process is running on the Hyper-V host. Thus, only crash-consistent (but not application-consistent) backups could be created. Keep your Integration Services up to date on both host and guest machines by enabling the automatic updates or installing the updated versions manually.
Use the Volume Shadow Copy Service (VSS) to carry out application-aware backups
The VSS can create transactionally consistent and application-aware backups by using the snapshots technique. There are two host-based Hyper-V VM backup methods – the Saved State method and Child VM Snapshot method, both of which use the VSS. The Saved State method is used for offline VM backup because the VM must be stopped temporarily while a snapshot of virtual disk is taken. This method is not application-aware and utilizes the VSS on the Hyper-V host. The Child VM Snapshot method is application-aware and can be used for backing up VMs while they are running. This method utilizes the VSS inside the child VM to create application-aware snapshots (or “checkpoints” in Hyper-V) with Hyper-V Integration Services.
Put the Hyper-V host into a workgroup
Suppose your Domain Controller (DC) runs on a VM residing on a Hyper-V host that is a member of this domain. If the VM with the DC went down, logging into the Hyper-V host would become impossible. You can avoid this potential problem by putting the Hyper-V host into a workgroup. With this approach, you (or your backup application) can log in to the Hyper-V host and recover the VM with your DC.
Do not back up Cluster Shared Volume devices directly
Cluster Shared Volumes (CSVs) are shared storage that contain NTFS volumes (“New Technology File System”, a proprietary Microsoft format). Multiple Hyper-V hosts can simultaneously access the same CSV for read/write purposes. The virtual disk files of VMs are stored on CSVs. Never back up CSV devices directly, for example on the disk level, because the VSS is not aware of such backup process; the VM’s data and application states would not be quiesced. Instead, back up your VMs using one of the host-level methods described above.
Use fixed-size virtual disks in production environments (rather than dynamically expanding virtual disks)
Fixed-size virtual hard disks ensure higher levels of security and performance than dynamically expanding virtual disks. This has an impact on the performance of the Hyper-V host. Dynamically expanding virtual disks experience significant file fragmentation. For this reason, locating the parts of the disk used by the blocks of your files could require excessive disk activity. Do not use pass-through disks for legacy backup; this strategy only increases Hyper-V backup complexity. VMs using pass-through disks cannot be backed up at the host level.
Keep enough free space on your backup destination storage
Insufficient disk space on your target disk can cause backup jobs to fail. Make sure your oldest backups are removed before your newest backup is performed to free up disk space; not all solutions do this automatically. In order to protect your backed-up data, you should monitor disk space consumption and ensure there is enough free space for new backup creation.
Keep an eye on disk warnings
Don’t ignore disk warnings; if you receive any, the disk on which your VM is stored may be damaged. In this case, any new backups could be made up of corrupted data and might not be bootable. If the disk on destination storage is corrupted, then the backups you copy to that corrupted disk can become unusable. When you see any disk errors or warnings, check the disk, copy the data stored there, and replace the disk as soon as possible.
Back up your VMs regularly
Regularly back up your Hyper-V VMs according to the RPO (Recovery Point Objective) and RTO (Recovery Time Objective) values established within the framework of your business continuity plan. Backups should be performed on a regular, scheduled basis, rather than sporadically. There is always the threat of a malicious attack, technical failure or natural disaster damaging your virtual machines and the data therein. Having properly performed, recent backups allows you to restore your data and resume the working process within a reasonable timeframe if disaster strikes. Read the white papers to learn more about RTO and RPO.
Verify your backups regularly
You must make sure that your backups have been created successfully and can be restored. Ideally, check backups as soon as they have been created. First, the data stored in a backup must be exactly identical to the source VM’s data. The second important step is to verify that the backup is functional and the VM can be recovered in real conditions.
Store at least one backup copy remotely
Keeping running VMs together with their backups at one site is not secure. If anything happens to that production site (e.g., a fire or a natural disaster), both the VMs and their backups can be destroyed. Backups stored on connected media can also be harmed by ransomware or other malware. Keep at least one backup copy offline and store at least one copy at remote site (or in the cloud) to protect your data against disasters. Read our blog post about the 3-2-1 Backup Rule to learn more.
Use appropriate backup software
Don’t use manually created scripts for Hyper-V VM backup, because this method can prove complicated and unreliable. Specialized, automated software can meet all the requirements of Hyper-V backup best practices, such as support for VSS integration, failover clusters, granular backup on the host level, automatic backup verification, etc.
How NAKIVO Backup & Replication Helps You Follow Hyper-V Backup Tips
NAKIVO Backup & Replication is a fast, reliable, and affordable backup solution that can help you protect your VMs effectively with the following Hyper-V-friendly features:
Agentless, image-based backup of live Hyper-V VMs
VMs are backed up at the host level with Volume Shadow Copy support.
Application-aware, forever-incremental VM backup
Taking advantage of Hyper-V’s Resilient Change Tracking (RCT) technology, the product easily copies only the blocks that have been changed since the last backup. You can create transactionally consistent backups of VMs running Oracle, MS SQL, MS Exchange, Active Directory and other applications or databases. You can quickly recover the entire VM when needed. You can just as easily use Instant File Recovery (for individual files or folders) or Instant Object Recovery (for MS SQL, Exchange or Active Directory objects) directly from compressed, deduplicated backups. Log truncation for Microsoft Exchange and SQL Server also help you save storage space.
Support for Hyper-V Cluster Shared Volumes (CSVs)
When a VM belongs to a Failover Cluster, the host on which this VM is residing can be changed after the failover event. The virtual disks of such VMs are located on a CSV and can be shared by multiple hosts. NAKIVO Backup & Replication automatically tracks these VMs and provides the ability to back them up even if they change hosts within a Failover Cluster.
This feature can help you create copies of VM backups and place them offsite or in the cloud. Microsoft Azure and Amazon AWS clouds, in particular, are supported. With this feature, you can ensure higher levels of protection for your Hyper-V VMs and avoid data loss in a case of a disaster.
This feature allows you to check if a backed up VM can be booted successfully. Immediately after a Hyper-V backup job, the VMs are automatically test-recovered. An email with screenshots of the loaded operating systems is sent. This way, you know that your backups are functional without having to manually check them.
The ability to carefully schedule backup jobs and avoid overlaps
Once you schedule your jobs with the Flexible Job Scheduler, the product runs them automatically at the specified times and keeps track of how long they take. This is all represented visually in the intuitive Calendar Dashboard.
User-friendly web interface
NAKIVO Backup & Replication makes Hyper-V backup convenient and straightforward. Product installation and backup configuration are intuitive. Technical documentation and official support provided by NAKIVO (which has customer satisfaction levels of 97.3%) can help you if any difficulties arise.
The tips outlined above can help you create fast, reliable, and cost-effective Hyper-V backups. Let’s recap quickly. Use fixed-size virtual disks for your Hyper-V VMs and make sure there is enough free space on your datastore. Keep an eye out for disk warnings. Include VMs in workgroups and make sure you have the latest version of Hyper-V Integration Services installed. Don’t back up CSVs directly; use a host-level method instead. Use a modern, agentless backup solution like NAKIVO Backup & Replication that allows granular recovery, application-aware backup, backup of individual VMs, remote backup copy creation, automated verification, and regular backup scheduling. Try the product’s full-featured Free Trial and see how easily you can follow these Hyper-V backup tips to keep your virtual environment protected.