Score:4

How does Azure Backup backup running VMs?

mf flag

We are planning on implementing Azure Backup backups of our VMs but I'm struggling to find any documentation that clearly states how the backups are taken?

I see snapshots are being taken but how does Azure Backup backup VMs without shutting them down? If a machine is in the process of writing files or changing settings how/at what point will the backup be taken if it isn't being shutdown?

Score:5
ng flag

It's the same technology used across all Windows systems and applications; it's called "Volume Shadow Copy".
https://en.wikipedia.org/wiki/Shadow_Copy

Here's a brief summary:

  • All applications that perform disk I/O tell the OS "hey, I'm doing I/O, please warn me when a backup is performed".
  • The OS takes notes about all VSS-aware applications.
  • An application wants to perform a backup and tells the OS "hey, please stop for a moment, I'm going to take a snapshot".
  • The OS tells to all VSS-aware applications to please stop doing I/O for a moment.
  • All VSS aware applications commit their I/O to disk and stop for a moment.
  • The OS takes a disk snapshot; this is consistent because all applications agreed to stop I/O for a moment.
  • The OS tells everyone "ok, you can resume working now".
  • The OS sends the frozen-in-time snapshot to the application which requested it.
cn flag
Not on my systems. It does that via a specific Hyper-V API that creates a checkpoint that is backed up. Running VMÄs get for every disc a new delta disc like with any normal checkpoint and at the end of the backup a merge is executed. This is NOT using the normal VSS function on the OS level of the host.
Massimo avatar
ng flag
@TomTom when a Hyper-V VM is backed up, the guest OS gets notified about it by the Hyper-V integration components and calls in turn all system-level and application-level VSS writers inside the guest OS. This ensures consistency across the whole chain.
mx flag
For reference, the same general idea is also usable on Linux via [fsfreeze](https://man7.org/linux/man-pages/man8/fsfreeze.8.html) functionality, and this approach is used by many VPS platforms for this purpose, though unlike VSS this does not require applications to opt-in for notifications (and usually has no way for them to do so).
cn flag
Yes, but this is only maintained for the small moment it takes to generate the snapshot.
Score:5
ca flag

Windows VMs by default enjoy app-consistent backups thanks to tight integration between VSS-aware apps, VSS service, Azure guest agent and the Azure infrastructure itself.

The above presumes that all VSS writes succeed, otherwise a filesystem-consistent backup is taken: this mean that, upon reboot, some applications may have lost the latest in-flight data. This is the same consistency model Linux VMs have by default, unless you take care of configuring custom backup scripts to sync app data to disk.

Here you can find more information.

Score:1
cn flag

I can not talk of Azure backup only for DPM (System Center Data Protection Manager), backing up Hyper-V instances.

What happens is that a VM level Checkpoint is created. I Think that sends the VM a VSS command to get the discs into consistent state, but on the Hyper-V level it basically replaces the Hyper-V level disc files (vhd, vhdx) with deltas and keeps the original files thus not getting any writes.

Then the whole thing is backed up.

Then the checkpoint is merged, writing all the changes into the original discs.

This means that any writes DURING the backup are basically not hitting the disc image being backed up.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.