August 2, 2017
Hyper-V Backup Best Practices
In a virtual environment you can’t rely on the same backup principles that you’d use in a physical environment. You need to take advantage of virtualization to make your Hyper-V backup process fast and safe. There are quite a lot of useful backup practices. Let’s find out which ones are the best.
Limit the Number of Roles per VM
Your Hyper-V backup and recovery process can be overly complicated if you assign too many roles to your VMs. For example, if your VM provides both directory and mail services, recovering the entire VM will roll back changes in both applications. To easily recover VMs, files, and application objects, your VMs should be assigned simple roles. For best results, one role should be dedicated per one VM.
Do not Rely on Hyper-V Snapshots
VM snapshots are great for things like troubleshooting and quick rollbacks, but VM snapshots are not backups, and should not be used as a means to protect data, as described in this post.
Separate Backup Software from the Main Infrastructure
If your Hyper-V backup software runs on the same host as your production VMs, chances are that any incident in your IT environment can affect your backups, making data protection and restores impossible. It’s best to install backup software on a dedicated server. With NAKIVO Backup & Replication you also have the option to install directly on QNAP, ASUSTOR, Synology, and Western Digital NAS.
Provision Enough CPU, RAM, and Bandwidth
VM backup involves data read, processing, and transfer. All these processes consume CPU, memory, network bandwidth, and storage. Therefore, you need to provision enough resources in order to ensure that your Hyper-V backup process is smooth:
- Provide enough CPU and RAM to the backup software (consult System Requirements). Note that increasing the amount of resources can speed up the processing speed.
- Backup speed depends on multiple factors: the read speed of the source datastore, available bandwidth between the source datastore and backup software, the processing speed of the backup software, bandwidth between the backup software and backup repository, and the write speed of the target datastore. The backup speed will be equal to the speed of the slowest element in this chain. Note that the throughput of each element varies in time, such as when multiple users or application read/write data from a datastore, limiting the available bandwidth. Thus, consider providing enough bandwidth to your backup software or scheduling your backups during non-peak hours.
Provision Enough Disk Space for Backups
The rule of the thumb is to have at least the same amount of space for your backups as you have for your VMs. While backup compression and deduplication will reduce the backup size (and your initial backups will take a fraction of that space), the recovery points that you’ll keep for each backup will eventually take up more and more storage space.
Install Latest Updates
Regularly updating your Hyper-V hosts and backup software can save you from dealing with issues that were already resolved in the latest updates.
Make Image-level Backups
Hyper-V backup consistency is of the highest importance. After a backup is made, your data should be easily restorable. If you perform a file-level backup, a part of your data may change while data transfer is in progress. So, this may result in a difference between files on the server and files in backup or may lead to data corruption. The problem can be solved by making image-level backups, which rely on Hyper-V snapshots to capture all VM data in the same state.
Enable the Application-aware Mode
When a crash-consistent backup is made, applications and databases such as Exchange and SQL may still have uncompleted database transactions and pending I/O operations in memory. Recovering from such a backup can leave you with databases in an inconsistent state. To avoid this, enable the application-aware backup mode, which relies on VSS to create application-consistent VM backups.
Use Forever-incremental Backup with RCT
A full VM backup normally has three weak points:
- Takes a long time
- Loads production networks
- Uses a significant amount of space
Good news that you don’t need to do full backups all the time. Forever Incremental backup with Resilient Change Tracking (RCT) technology from Microsoft, enables the backup software to track and copy only changes made since the last backup. This helps to perform backups faster and transfer less data.
Schedule Hyper-V Backup Carefully
The backup is normally a resource-intensive process and it uses the resources of your hosts and storage devices. When you back up too many VMs on the same host, it may create a bottleneck for all those VMs. To avoid this, you need to plan your backup and ensure that your data is backed up regularly. Backup scheduling helps to avoid load concentration on a single resource. Do not backup too many VMs on the same host to protect your VMs performance from degradation. You should plan backup schedules carefully to ensure that backups occur in a balanced manner which do not cause resource problems for your VMs.
Verify VM Backups
To be sure that you can restore from your backups you need to verify the backup data. NAKIVO Backup & Replication provides an automated way to near-instantly verify VM backups. After a VM backup is completed, the product can instantly recover the VMs, wait until the OS has booted, make a screenshot of the OS, discard the test-recovered VM, and send you a report with the screenshot via email. This way you can not only trust that you have a good backup, but also see (and show to your management) that backups are good and VMs can be recovered.
Follow the 3 - 2 - 1 Rule
Having one backup is not enough as it can get corrupted or unavailable. So, you will need to make several copies of your backups, and the best strategy to do it is to follow the 3-2-1 rule:
- Have 3 copies of data - one original and two backups
- Store backups on 2 types of media - for example, local server and cloud service
- Keep at least 1 backup offsite
Encrypt Offsite Backups
If you’re sending backups offsite (and you should) your data should be encrypted before the first bit leaves your premises. When your backups arrive to its destination, they should remain encrypted. When choosing an encryption method, it’s best to stick to the industry-standard AES-256 encryption algorithm, which is used by government, military, and financial institutions to secure sensitive data.