How to Choose the Right Hyper-V Backup Strategy

Written by valeryyy | Published 2021/11/03
Tech Story Tags: backup | data-security | cybersecurity | hyper-v | hyper-v-backup | data | software-development | data-privacy

TLDRData protection involves mechanisms and strategies that enable you to recover your data in case of any data loss scenario. Timely backups can help you successfully tackle both data protection and availability. Microsoft relies on System Center Data Protection Manager (DPM) to backup your data without implementation of third-party software. DPM is a powerful backup and recovery system that allows you to back up your data at the guest or host level. Host-level backups occur at the hypervisor level. Saved State and Child VM Snapshot are the two methods for performing host level backups.via the TL;DR App

Hyper-V environments are convenient and cost-efficient. That's why the Hyper-V architecture is often the number one choice of many businesses. If you run a Hyper-V environment for your business, you need to ensure that the data residing on your Hyper-V virtual machines (VMs) remains protected and available under any circumstances.
Data protection involves mechanisms and strategies that enable you to recover your data in case of any data loss scenario. Data availability ensures employees have continuous access to data. Timely backups can help you successfully tackle both data protection and availability. This post discusses the main data protection strategies that can help you keep your Hyper-V data secure at all times. 

1. Using Microsoft’s Native Data Protection

Microsoft relies on System Center Data Protection Manager (DPM) to backup your data without implementation of third-party software. DPM is a powerful backup and recovery system that allows you to back up your data at the guest or host level. 

Hyper-V Guest Backups

There are four scenarios where you can implement guest level backups.
The guest operating system (OS) is not supported by the hypervisor. In this case, you cannot run app-consistent backups at the host level. 
The VM is connected to a storage area network (SAN) or network attached storage (NAS) at the guest OS level. In this case, the Volume Shadow Copy Service (VSS) writer is unable to back up all of the disks used by the VM. 
Granular application-level recovery. In this case, the purpose of your backup is the granular recovery of the objects. 
Saving Costs. Some businesses with small Hyper-V environments used guest-level backups to save costs. Nowadays, this method is not recommended since there are equally affordable host-level backups.
How does guest-level backup work? Guest level backup requires you to install an agent on the VM that you wish to back up. Guest-level backup utilizes a VSS, a native tool for a Hyper-V backup. Before the backup, the VSS quiesces the disk volumes and takes a snapshot of the disk. During quiescing, the OS freezes for a moment, enabling VSS to capture the data for a backup. Quiescing ensures that data across applications and databases is transactionally consistent. Guest-level backup has a number of disadvantages such as:
Inefficiency. Because an agent needs to be installed on every VM, guest-level backups take up a long time and require a lot of effort on the part of the IT team. 
Incompleteness. Guest-level backup does not allow you to back up the configuration components of your VM, such as disks, networks, and virtual CPU memory. Because of this, guest OS backups make the recovery process more difficult. When recovering from a guest-level backup, you need to create a new VM with configurations of the recovered VM. 
Overconsumption of computing resources. Guest-level backups consume more computing resources than host-level backups. 

Hyper-V Host Backups

Unlike guest-level backups, host-level backups occur at the hypervisor level. Host-level backup allows you to capture the entire VM along with its configuration settings. The two methods for performing host level backups are Saved State and Child VM Snapshot.
The Saved State method works by putting a VM into a hibernation state and then using a VSS writer to acquire a snapshot of the VM. During the backup, the data is not modified. The snapshot that you take during the backup is called a VM checkpoint. After the snapshot is taken, your VM wakes up from hibernation and can be used again. 
The Child Snapshot method is more practical. It doesn’t require you to put your VM into a hibernation state. With the Child Snapshot approach, you can run your production while your backup is taking place. The Child Snapshot method allows you to maintain transactional consistency between applications and databases by allowing you to run app-aware backups. App-aware backups lower the risk of incomplete backups or data corruption during backups. To be able to use the Child Snapshot method, you need to fulfill the following criteria: 
The System Center DPM must be installed on the server that hosts your Hyper-V hypervisor. 
The Hyper-V integration services must be installed on your child VMs (the integration services are installed by default in modern versions of Hyper-V). 
To summarize the difference between guest-level and host-level backups, it should be noted that host-level backups are much more efficient for the following reasons:
Host-level backups do not require you to install the DPM agent on every VM
Host-level backups capture your VMs along with configuration settings
Host-level backups are app-aware and ensure transactional consistency 

2. Using Third-party Data Protection 

A third-party backup solution is a much better option for backing up your data compared to native data protection. The benefits of using the third-party software are:
Agentless and app-aware backups
Incremental backups with Resilient Change Tracking (RCT) technologies
Full and granular recoveries
Backup size reduction techniques
Disaster recovery orchestration
Clearly, a third-party backup solution has all of the benefits of the host-level backup along with other features that can greatly improve your backup process. Let’s go over those features and benefits in greater detail.

Resilient Change Tracking (RCT)

The RCT technology was implemented by Microsoft in 2016. RCT is analogous to Microsoft’s Changed Block Tracking. The architecture of RCT allows you to copy only those blocks of data that have changed since your previous backup. RCT makes it possible to run incremental backups, saving you time and storage space. To be able to use the RCT technology, you need to have a VM of version 6.2 or higher. 

Agentless and App-aware Backups

Modern third-party backup solutions do not require an agent to be installed on every VM. This makes the entire backup procedure more lightweight, time-saving and cost-effective. At the same time, a third-party backup solution can utilize Microsoft’s native data protection tools such as VSS to run app-aware backups. App-aware backups are a must-have if you want to produce efficient backups capable of recovering your critical data in full. App-aware backups involve quiescing and capturing all data before the backup, such as information in memory and pending transactions. App-aware backups ensure consistency of information. That way, you can recover your data as a whole, and no other steps are required to restore your VMs and applications. 

Full and Granular Recoveries

You can perform a full recovery when you need to restore the whole VM after a data loss event or system failure. Granular recoveries allow you to recover individual files or objects instantly without performing a full recovery. That way, if you need to restore a single document or user account, you can easily do so without recovering the whole VM. A modern backup solution allows you to boot your VM from a backup in the event of disaster or system failure, ensuring no interruption in the production workflow. Alternatively, a modern third-party solution allows you to recover individual files, folders, and objects from a Hyper-V backup directly to the original or custom location. 

Backup Size Reduction And Improved Performance

An efficient third-party backup solution includes built-in tools that allow you to reduce the size of your backups. These tools include:
  • Deduplication and compression 
  • Log truncation
  • Exclusion of swap data, unused blocks and partitions 

Minimizing a backup can help you lower the amount of storage used thereby considerably reducing costs. In addition, your third-party backup solution should include features that improve your overall backup process, such as:
Network acceleration. This feature can speed up your backup two times in busy LAN and WAN environments. 
LAN-Free Data Transfer. Enables you to bypass the host’s TCP/IP stack thereby producing faster backups and reducing the network load. 
Advanced Bandwidth Throttling. Controls how much bandwidth is used by your backup jobs. This feature plays an important role by ensuring that your backup activities do not destruct your daily operations.

Disaster Recovery and Orchestration

Natural disasters, ransomware attacks, and system failures can cause significant damage to your business. An efficient third-party backup software includes automated disaster recovery tools that ensure protection of your Hyper-V VMs in the event of disaster. The best disaster recovery features enable you to immediately failover from the affected production site to your standby environment and then failback after the threat has been cleared. To be able to initiate data recovery in the event of disaster, a backup solution can help you create and store the VM replicas. You should also be able to test your site recovery jobs to ensure that your recovery process is functioning properly. 

Applying Hyper-V Best Practices to Manage Your Daily Backups

Before choosing your backup strategy, review the Hyper-V backup best practices that can help you decide which backup strategy works best for your business. 
Setting up the right RTOs and RPOs 
To ensure quick recovery of your data during a disruptive event, you need to set up unique recovery time objectives (RTOs) and recovery point objectives (RPOs) for your business and incorporate them into your recovery plan. 
An RTO determines the amount of downtime that your business can tolerate in case of disaster. In other words, how long your business can survive and remain functional without having its production up and running. 
An RPO has to do with backup iterations by analyzing the time of your last backup in relation to a disruptive event. If you back up your data an hour before the incident, you may end up losing all data that has been accumulated after the backup. If you backed up your data a day prior to the incident, you may lose the whole day of data. This means that if you can’t afford to lose much data, you need to back up your data as frequently as possible. Your RPOs determine the amount of data your business can lose and still be capable of functioning at an acceptable level. Thus, both RTO and RPO play an important role when developing your backup strategy. 

Following the 3-2-1 Backup Rule 

The 3-2-1 approach recommends having at least three backup copies of your data: your production data and two backup copies. The rule advises storing the two copies of your data on different storage media, for example in the cloud and on tape. Lastly, the rule suggests keeping one copy off-site. During a disruptive incident such as ransomware attack, natural disaster or system failure, you can always use a good backup and recover your data in no time. 

Verifying Your Backups

If you faced any type of permanent data loss scenario, you would need to recover your Hyper-V environment from the priorly arranged backups. Your backups need to be in good condition to ensure a smooth recovery. If your backups were damaged or corrupted during the backup process, you won’t be able to reinstate your data in full, and some of the critical information may be missing. The most distressing thing, however, is to find out that your backup is corrupted right when you need it the most. To ensure that your backups are intact, you can use a backup verification feature that is a part of a modern third-party backup solution.The backup verification feature enables you to boot your VM from the backup and check the presence of hypervisor tools (Hyper-V Integration Services). The solution can help you verify if your guest OS is running. Once you get confirmation, it means that your backup is valid, and you can use it to recover your data.

Automating Your Data Protection

To run your production effectively, you need to automate your backup process. A smart backup solution enables you to automatically schedule and run the backup jobs. Automation enables you to speed up the backup process and diminish the chance of human error. Scheduling and launching backups manually slows down production and creates room for mistakes. Thus, you need to apply automation in all possible scenarios to manage your Hyper-V backups with the highest efficiency. 

Creating a Data Retention Policy 

Having a sufficient amount of storage space is critical for every business. When it comes to backups, storage is one of the highest concerns because backups take up a significant amount of storage space. One of the benefits of a third-party backup is that it allows you to save storage space by creating a custom data retention policy. There are multiple data retention schemes that you can implement to safeguard your data. However, one of the most practical and widely-used schemes is a grandfather-father-son (GFS) rotation scheme. The GFS scheme enables you to keep the required backups while freeing space for new information. 

Implementing Encryption and Role-based Access Control (RBAC)

Use encryption to ensure security of your backup data “in flight” and “at rest”. “In flight” refers to data that moves from one location to another. “At rest” refers to data that resides on a disk or backup repository. Encryption prevents your data from being exposed to hackers or any unauthorized users. RBAC allows you to assign roles that enable only certain specialists to do certain tasks. For example, one administrator can schedule backups and another can perform recoveries. Limited access prevents human error, data deletion, and data theft. 

Summing Up

You can back up your Hyper-V VMs either by using Microsoft’s native data protection tools or with a third-party backup solution. Third-party software is a preferred option because it encompasses best native data protection features along with additional perks that can greatly enhance your overall backup performance. By choosing the right backup strategy and following Hyper-V best practices, you can refine your backup process and enhance the security of your Hyper-V data. 

Written by valeryyy | Tech writer
Published by HackerNoon on 2021/11/03