This is an archive version of the document. To get the most up-to-date information, see the current version.

Online Backup

In this article

    Online backup is the recommended backup method for Hyper-V VMs. This type of backup requires no downtime — VMs remain running for the whole period of backup and users can access them without any interruption. Online backup can only be performed if a VM meets a number of conditions: the VM runs under a VSS-aware guest OS, Hyper-V Integration Services are installed inside the guest OS, the backup integration is enabled, and some other requirements. For a complete list of conditions required for online backup, refer to Microsoft Hyper-V documentation.

    For online backup, Veeam Backup & Replication uses a native Hyper-V approach. To quiesce VM data, Hyper-V uses two VSS frameworks that work at two different levels and communicate with each other:

    • The VSS framework at the level of the Hyper-V host. This VSS framework is responsible for taking a snapshot of the volume on which VMs are located (this snapshot is also called external snapshot).
    • The VSS framework inside the VM guest OS. This VSS framework is responsible for quiescing data of VSS-aware applications running inside the VM and creating a snapshot inside the guest OS (this snapshot is also called internal snapshot).

    Online backup includes the following steps:

    1. Veeam Backup & Replication interacts with the Hyper-V host VSS Service and requests backup of specific VMs.
    2. The VSS Writer on the Hyper-V host passes the request to the Hyper-V Integration Components (HV-IC) installed inside the VM guest OS.
    3. The HV-IC, in its turn, acts as a VSS Requestor for the VSS framework inside the VM — it communicates with the VSS framework installed in the VM guest OS and requests backup of VSS-aware applications running inside this VM.
    4. The VSS Writers within the VSS-aware applications inside the guest OS are instructed to get the application data to a state suitable for backup.
    5. After the applications are quiesced, the VSS inside the VM takes an internal snapshot within the VM using a VSS software provider in the VM guest OS.
    6. After the internal snapshot is taken, the VM returns from the read-only state to the read-write state and operations inside the VM are resumed. The created snapshot is passed to the HV-IC.
    7. The HV-IC notifies the hypervisor that the VM is ready for backup.
    8. The Hyper-V host VSS provider takes a snapshot of a volume on which the VM is located (external snapshot).
    9. The volume snapshot is presented to Veeam Backup & Replication. Veeam Backup & Replication reads VM files from the volume snapshot using one of two backup modes — on-host backup or off-host backup. After the backup is completed, the snapshot is deleted.

    Online Backup 

    Internal and external snapshots are taken one after another, with a little time difference. During this time interval, the VM on the volume is not frozen – its applications and OS are working as usual. For this reason, when the external snapshot is created, there may remain unfinished application transactions inside the VM, and this data can be lost during backup.

    To make sure the VM data is consistent at the moment of backup, Hyper-V VSS Writer performs additional processing inside the created external snapshot — this process is also known as auto-recovery.

    Auto-recovery is performed when a volume snapshot is taken. This process includes the following steps:

    1. Right after the snapshot of a volume is taken, Hyper-V host VSS allows the Hyper-V host VSS Writer time to update data inside the external snapshot before it is permanently changed to the read-only state.
    2. The Hyper-V host VSS Writer rolls back a VM on the external snapshot to the state of the internal snapshot. All changes that took place after the internal snapshot was taken are discarded – this way, VM data inside the external snapshot is brought to a completely consistent state suitable for backup. At the same time, the internal snapshot inside the VM guest OS is deleted.
    3. As a result, you have a VM on the production volume, and a consistent volume snapshot that Veeam Backup & Replication uses for backup.

    Online Backup Note:

    Auto-recovery may take up to several minutes.