shutdown instead of stop to make backups

pJonathan

Member
Sep 11, 2021
41
0
11
25
Hey, is there a option to shutdown a VM before a Backup? I just see the stop function but this not very safe.
And why does the VM start before the backup before the backup is completed?
 
Last edited:
And why does the VM start before the backup before the backup is completed?
The backup mechanism reads the files via the same process the VM runs. Therefore it is "started" (talking from a process standpoint), it's not acutally running your guest os.

Hey, is there a option to shutdown a VM before a Backup?
Not that I know of.

You can also do online backups, which may be sufficiently consistent depending on the used guest os. Why don't you use that?
 
Snapshots. Both 'Stop' and 'Snapshot' backup modes use the Snapshot-feature of the underlying storage. That is the reason why the downtime is low for the Stop backup mode.

The 'Stop' mode initiates a shutdown of the VM, then makes a snapshot followed by a reboot.

The 'Snapshot' mode only signals the OS to clear its caches, and then makes a snapshot.

Generally most OSes these days work well with Snapshot mode if you install the QEMU guest agent (and activate the agent in the VM options). The 'Stop' mode is safer because it guarantees file system integrity at the cost of a small downtime (and other things, like not being able to use the dirty-bitmap speedup feature).
 
Hi,
Snapshots. Both 'Stop' and 'Snapshot' backup modes use the Snapshot-feature of the underlying storage. That is the reason why the downtime is low for the Stop backup mode.
backups for VMs do not rely on support from the underlying storage for snapshots (for containers, they do). Instead, the "snapshot" mechanism (it's actually an internal overlay rather than a snapshot) is implemented in QEMU's block layer and thus works on all storages.
 
  • Like
Reactions: B.Otto