With Veeam Backup & Replication, 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 VMware vSphere format on a spare ESX(i) host and maintains this copy in sync with the original VM.
Replication provides the best RTOs as you actually have a copy of a 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. For this reason, 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 ESX(i) 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 VMware vSphere snapshot. When you perform incremental replication, data blocks that have changed since the last replication cycle are written to the snapshot delta file next to a full VM replica. The number of restore points in the chain depends on your retention policy settings.
To provide extremely fast incremental replication, Veeam Backup & Replication uses the VMware vSphere functionality, ESX Changed Block Tracking (or CBT). With CBT, 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 must be added to the Veeam Backup & Replication console. These include a source and target ESX(i) hosts, a backup proxy (used as a data mover) and a backup repository (used for storing auxiliary replica files). The latter two components are required for a distributed architecture scenario only.
- [Optional] To receive an e-mail notification when a replication job completes, specify global e-mail notification settings. To do that, select General Options from the main menu of Veeam Backup & Replication and specify necessary settings on the E-mail Settings tab.
- [Optional] To evaluate the application-aware image processing feature, make sure that at least one of replicated VMs runs Microsoft Windows 2003 SP1 or later.
To replicate a VM, perform the following steps.
- Open the Home view.
- On the Home tab, click the Replication Job button and select VMware vSphere to launch the New Replication Job wizard.
- At the Name step of the wizard, specify a name for the created replication job.
You can replicate individual VMs or VM containers: folders, resource pools, clusters, vApps, datastores 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, specify 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.
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 must 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 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 must 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 must be registered.
- Click Choose next to the Resource pool field and select the destination resource pool.
- Click Choose next to the VM folder field and select a folder to which a replicated VM must be placed.
- Click Choose next to the Datastore field and select a datastore where VM replica files must 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, in 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, specify a suffix to append to the name of the replica. Veeam Backup & Replication will use the name of the primary VM with the suffix for the name of the replica VM.
- Select the maximum number of restore points that you want to keep on disk. By default, Veeam Backup & Replication keeps 7 restore points.
At the Job Settings step of the wizard, click Advanced to specify additional settings for the replication job.
- On the Traffic tab, make sure the Exclude swap file blocks 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.
- Open the Notifications tab. Select the Send email notifications to the following recipients check box and specify the e-mail address.
When the job completes, you will receive an e-mail notification with details on job performance. Note that you will be able to receive an e-mail notification only if you specify global e-mail settings. To specify e-mail settings, select General Options from the main menu.
Make sure that you specify your e-mail 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.
- Open the vSphere tab.
- If you replicate a non VSS-aware VM, for example, a Linux-based VM, make sure that the Enable VMware tools quiescence check box is selected. This option helps create transactionally consistent replicas of such VMs.
- Make sure the Use changed block tracking data check box is selected. For VMware VMs with hardware version 7 or later, Veeam Backup & Replication employs VMware vSphere Changed Block Tracking (or CBT). Instead of scanning VMFS to know which data blocks have changed since the previous job run, Veeam Backup & Replication queries the CBT module 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, incremental replication will be performed 20 times faster.
- Make sure the Enable CBT for all processed VMs automatically check box is selected, too. This option forces use of CBT even in case it is switched off at the level of the ESX(i) host.
At the Data Transfer step of the wizard, you must select backup infrastructure components that will be used for the replication process and choose a path for VM data transfer.
- In the Source proxy and Target proxy fields, select the backup proxy that must be used for VM replication. You can assign backup proxies explicitly or leave the Automatic option selected. In the latter case, Veeam Backup & Replication checks settings of available backup proxies and select the most appropriate one for the job — the backup proxy that will enable the most efficient data retrieval from the source datastore. Veeam Backup & Replication first attempts to choose a backup proxy that uses the Direct storage access mode, then the backup proxy that uses the Virtual appliance mode. If such proxies are not available, Veeam Backup & Replication selects the least loaded backup proxy that uses the Network mode.
- During the replication process, VM data can be transferred directly thorugh 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 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 Credentials. Select a VM in the list and click Set User. Then specify guest OS credentials with 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 use VMware Tools quiescence to create a transactionally 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 run manually, or scheduled to run periodically. 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 the virtual environment.
- Click Apply.
- 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.
In addition to general job statistics, you can view detailed data for each VM or VM container processed by the job.
- Open the Home 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 Home 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.
To check replication results:
- Open the vSphere Client and make sure that a VM replica has been created.
- In Veeam Backup & Replication, open the Files view.
- In the inventory pane, expand the datastore to which the replica has been stored. Browse to the <ReplicaName> folder and make sure that files of the VM replica are available there.
- 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 e-mail message once the job completes, open your e-mail client and check the Inbox folder. Make sure that you have two e-mail messages with job results — one for the full replication, and another one for the incremental replication.