With Veeam, you can not only back up, but also replicate your VMs. When you replicate a VM, Veeam Backup & Replication creates an exact copy of a production VM in the native Hyper-V format on a spare Hyper-V host and maintains this copy in sync with the original VM.
Replication provides the best RTOs as you actually have a copy of your VM in a ready-to-start state. If the primary VM goes down for some reason, you can immediately fail over to the VM replica and restore critical services with minimum downtime. Subsequently, replication is most commonly used for VMs running tier 1 applications.
Replication is a job-driven process. During the first run of a replication job, Veeam Backup & Replication copies the whole VM image and registers a replicated VM on the target Hyper-V host. During next cycles of a job, Veeam Backup & Replication copies only incremental changes and creates restore points for a VM replica so you can recover your VM to the necessary state. Every restore point is in fact a usual Hyper-V checkpoint. When you perform incremental replication, data blocks that have changed since the last replication cycle are written to the checkpoint differential disk. The number of restore points in the chain depends on your retention policy settings.
To provide extremely fast incremental replication, Veeam Backup & Replication uses its proprietary changed block tracking technology. With changed block tracking, you can replicate much faster and can schedule replication jobs as often as every few minutes. So you get near-CDP at only a fraction of the cost of traditional CDP solutions.
With Veeam Backup & Replication, you can perform both onsite replication for HA and offsite replication for DR scenarios. For replication over WAN or slow links, Veeam Backup & Replication provides a number of means to optimize data transmission: it performs inline deduplication and compresses replica traffic. You can also configure network throttling rules to prevent replication jobs from consuming the entire bandwidth of your environment and perform replica seeding.
Please note that this guide describes replication to a local target host located in the same network. To learn about replicating offsite, see Veeam Backup & Replication User Guide.
- All backup infrastructure components that will take part in the replication process should be added to the Veeam Backup & Replication console. These include a source and target Hyper-V hosts. If you plan to use a distributed deployment scenario, you should also have an offhost backup proxy.
- [Optional] To receive an email notification when a replication job completes, specify global email notification settings. To do that, select Options from the main menu of Veeam Backup & Replication and specify necessary settings on the Email Settings tab.
- [Optional] To evaluate the application-aware image processing feature, make sure that at least one of replicated VM runs the following OSes:
- Microsoft Windows Server 2003
- Microsoft Windows Server 2008
- Microsoft Windows Server 2008 R2
- Microsoft Windows 7
- Microsoft Windows 8
- Microsoft Windows 8.1
- Microsoft Windows 2012 Server
- Microsoft Windows 2012 R2 Server
To replicate a VM:
- On the Home tab, click the Replication Job button.
- At the Name step of the New Replication Job wizard, specify a name for the created replication job.
You can replicate individual VMs or VM containers: Hyper-V hosts, clusters, SCVMM and so on. Jobs with VM containers are dynamic in nature: if a new VM is added to the container after the replication job is created, the job is automatically updated to include the new VM.
- At the Virtual Machines step of the wizard, click Add.
- To quickly find a VM or VM container, enter the name of the object that you want to find in the search field and click the Start search button on the right. Select a VM or VM container in the displayed list and click Add.
The object will appear in the Virtual machines to replicate list.
If you create a replication job for a VM container, you can exclude specific VMs or VM containers from the replication job. You can also select which VM disks to replicate.
- At the Virtual Machines step of the wizard, click Exclusions.
- On the VMs tab, click Add. Select VMs that must be excluded. To quickly find a VM or VM container, enter the name of the object you want to find in the search field and click the Start search button on the right.
- On the Disks tab, select a VM and click Edit to select disks that should be replicated. This functionality is useful, for example, if you only want to replicate VM system drives.
If you want to exclude disks of a VM added as part of a container, click Add VM on the right to include the VM in the list as a standalone instance.
- Click OK.
- Click Recalculate to see the total size of replicated objects.
If you have included a number of VMs or VM containers in the replication job, you can specify the order in which VMs should be processed. This will help you make sure that the most important VMs in the job are processed first, for example, if you must fit into the backup window and you are not sure how much time VM processing will take.
- At the Virtual Machines step of the wizard, click the added VM in the list.
- Use the Up and Down buttons on the right to move the VM higher or lower in the list. The higher is the VM in the list, the higher its priority. If you added a VM container as a single instance, VMs inside the container will be processed at random.
At the Destination step of the wizard, specify the target for a replicated VM.
- Click Choose next to the Host or Cluster field and select a host on which the VM replica should be registered. You can assign a cluster as a target. In this case, the replication job will be performed until there remains at least one available host in the cluster.
- Click Choose next to the Path field and specify a path to a location where VM replica files should be stored.
You must point the replication job to a backup repository. The backup repository stores replica metadata (checksums of read data blocks) required to streamline incremental passes of the job.
- At the Job Settings step of the wizard, from the Repository for replica metadata list, select the backup repository that you have configured. A metadata file created by the job will be stored to this backup repository.
- In the Replica name suffix field, enter a suffix to append to the name of the replica. Veeam Backup & Replication will use the name of the primary VM with the suffix appended to register a VM replica on the target host.
- Select the maximum number of restore points that you want to keep on disk. By default, Veeam Backup & Replication keeps 28 restore points.
At the Job Settings step of the wizard, click Advanced to specify additional settings for the replication job.
- Make sure the Exclude swap file blocks from processing check box is selected.
Swap files are dynamic and change intensively between runs of a replication job. With this option selected, Veeam Backup & Replication will identify data blocks of the Microsoft Windows pagefile in the guest OS and exclude them from processing, which will result in increased performance and a smaller size of increments.
- During replication, Veeam Backup & Replication compresses VM data to reduce load on the network. Veeam Backup & Replication offers 5 compression levels that provide different compression ratios to meet the needs of your environment: None, Dedupe-friendly, Optimal, High and Extreme.
- Click the Notifications tab. Select the Send email notifications to the following recipients check box and specify the email address. When the job completes, you will receive an email notification with details on job performance. Note that you will be able to receive an email notification only if you specify global email settings. To specify email settings, select Options from the main menu.
Make sure that you specify your email address once: either in the To field in general notification settings, or in job notification settings. If you specify both, you will receive two identical notifications when the job is completed.
- Click the Hyper-V tab.
- If you replicate a non VSS-aware VM (for example, Linux-based VMs), select the Enable Hyper-V guest quiescence check box.
- Make sure that the Take crash consistent backup instead of suspending VM check box is selected. Veeam Backup & Replication will use the crash-consistent method instead of offline backup and will not bring the VM offline.
- Make sure that the Use changed block tracking data check box is selected. In this case, Veeam Backup & Replication employs its proprietary changed block tracking technology. Instead of scanning the VM image to know which data blocks have changed since the previous job run, Veeam Backup & Replication queries the CBT driver to get the list of changed blocks. Use of CBT increases the speed and efficiency of block-level incremental replication. For example, if only 5% of a VM changed since the last replication cycle, incremental replication will be performed 20 times faster.
You must select backup infrastructure components that must be used for the replication process and choose a path for VM data transfer.
- Click Choose next to the Source proxy field. Make sure that the Offhost backup option is selected in the Backup Proxy window. Veeam Backup & Replication will offload the replication processing from the source Hyper-V host to the offhost backup proxy you have configured and thus reduce the load on the production host.
- Make sure that the Failover to onhost backup mode if no suitable backup proxies are available check box is selected. If the offhost backup proxy is not available or is not properly configured, Veeam Backup & Replication will use the onhost backup method to process VMs.
- During the replication process, VM data can be transferred directly via backup proxy(ies) to the target datastore or via a pair of WAN accelerators. The latter scenario is recommended for replicating VM offsite or over slow network connections. To learn more about WAN acceleration, see Veeam Backup & Replication User Guide.
In this exercise, source and target hosts are located onsite. For this reason, leave the Direct option selected.
To replicate VMs running VSS-aware applications, Veeam Backup & Replication uses application-aware image processing based on Microsoft VSS. Jobs with application-aware image processing produce transactionally consistent replicas, that, unlike crash consistent replicas, ensure proper recovery of virtualized applications without any data loss.
To enable application-aware image processing:
- At the Guest Processing step of the wizard, select the Enable application-aware processing check box.
- Specify guest OS credentials (username and password) with Local Administrator privileges on all VMs included in the job. OS credentials are required to install, start and remove a runtime process that coordinates VSS activities inside the VM.
- By default, the specified guest OS credentials are used for all VMs processed by the replication job. If you replicate several VMs that use different guest OS credentials, click Advanced. Select a VM in the list and click Set User. Then enter guest OS credentials with Local Administrator privileges for this specific VM. Repeat the procedure for all VMs in the job.
- To specify advanced options for VSS processing, click Applications. Select a VM in the list and click Edit.
- On the General tab, select Try application processing, but ignore failures to continue the replication job even if VSS errors occur. If VSS processing fails during the job, Veeam Backup & Replication will create a crash-consistent VM replica.
- Make sure that the Process transaction logs with this job option is selected to correctly handle transaction logs after the replication job is complete. In this case, if the replication job finishes successfully, Veeam Backup & Replication will truncate transaction logs so that they do not overflow storage space. If you use a third-party backup tool that maintains the consistency of transaction logs, select the Perform copy only option to prevent possible conflicts.
A replication job can be scheduled or run manually. To schedule a replication job:
- At the Schedule step of the wizard, select the Run the job automatically check box. If you do not select this check box, the job will be saved and you will have to run it manually.
- Select the schedule type: daily, monthly, periodically or continuously. You can also chain the jobs so that they run one after another.
- Select the Retry failed VM processing check box. During the retry cycle, only VMs that have failed during the main replication cycle will be processed.
- Select the Terminate job if it exceeds allowed backup window check box and click Window. Define the backup window for your environment. In case the created job overlaps the specified window, it will be automatically terminated not to produce additional overhead on your virtual environment.
- Click Create.
- Review the summary of replication job settings.
- Select the Run the job when I click Finish check box and click Finish. The job will start.
When a replication job is running, you can view job statistics in the real-time mode. Job statistics provide detailed data on the job: job progress, duration, processing rate, performance bottlenecks, the amount of data processed, read and transferred, and other details of the job performance.
Beside general job statistics, you can view detailed data for each VM or VM container processed by the job.
- Open the Backup & Replication view.
- In the inventory pane, select Jobs > Replication.
- Double-click the job in the working area and click Show Details. Now you can track the job performance as the job runs.
- Select the name of a specific VM or a VM container to view detailed statistics for this specific object only.
- Wait for the job to complete. Note that the job must complete with the Success or at least the Warning status. If the job completes with the Failed status, the VM replica will not be created, and you will not be able to perform failover and failback operations.
To perform incremental replication of a VM, do the following:
- Open the Backup & Replication view.
- In the inventory pane, select Jobs > Replication.
- Right-click the job in the list and select Start. Wait for the job to complete. Note that the job must complete with the Success or at least the Warning status.
During replication cycles, Veeam Backup & Replication creates the following files for a VM replica:
- A full VM replica (a set of VM configuration files and virtual disks). During the first replication cycle, Veeam Backup & Replication puts these files to the selected datastore to the defined folder and registers a VM replica on the target host.
- Replica restore points. During incremental replication, Veeam Backup & Replication creates restore point and stores it next to a full VM replica.
To check replication results:
- Open the Hyper-V Manager and make sure that a VM replica has been created.
- In Veeam Backup & Replication, open the Files view.
- In the inventory pane, expand file tree of the target Hyper-V host. Make sure that the Replicas folder has been created on the target storage and that this folder contains files of a VM replica.
- Open the History view and select the Jobs node in the inventory pane. Double-click the replication job in the list. Check the properties of the created replica.
- If you have configured to receive an email message once the job completes, open your email client and check the Inbox folder. Make sure that you have two incoming emails with job results — one for the full replication, and another one for the incremental replication.