Proxmox VEXIII · Proxmox Backup ServerPBS integration
Backup modes: snapshot, suspend and stop
What you'll learn
- State exactly what stop, suspend and snapshot mode do to a running guest
- Distinguish crash consistency, filesystem consistency and application consistency, and name what provides each
- Choose a mode per workload rather than per cluster, and justify the choice
- Verify that the guest agent freeze actually happened, rather than assuming it from a green job
Prerequisites
Verified against Proxmox VE 9.2.4 · Proxmox Backup Server 4.2.5 · Ceph Squid / Tentacle · Debian 13 (Trixie) · Linux kernel 7.0 (PVE 9.2 default) · 2026-08-12
--mode is one word in a backup job definition and it is the setting that
determines what your backup is actually a backup of. Get it wrong and the
job still succeeds, the notification is still green, the snapshot still
appears in the datastore, and the restored database still refuses to start.
Almost every cluster runs every guest in snapshot mode because it is the
default and because it does not interrupt anything. That is usually correct.
The lesson is about knowing why it is correct, and recognising the workloads
where it is not.
The three modes, for virtual machines
| Mode | What happens to the guest | Downtime | Documented as |
|---|---|---|---|
stop | Orderly shutdown, then a background QEMU process backs up the data. The guest is started again once the backup process has taken over. | Shutdown + start, not the backup duration | “provides the highest consistency of the backup, at the cost of a short downtime in the VM operation” |
suspend | The VM is suspended, then snapshot mode is invoked | Longer than snapshot, without a matching consistency gain | “provided for compatibility reason, and suspends the VM before calling the snapshot mode” |
snapshot | Nothing. Data blocks are copied while the VM runs | None | “provides the lowest operation downtime, at the cost of a small inconsistency risk” |
The three consistency levels
The modes are a means. The thing you are choosing between is consistency, and there are three levels, not two.
| Level | What it means | What produces it |
|---|---|---|
| Crash consistent | The image is what the disk would look like if you pulled the power at that instant | snapshot mode with no guest agent |
| Filesystem consistent | The guest filesystem journal is quiesced and no writes are in flight at the freeze point | snapshot mode + guest agent fs-freeze |
| Application consistent | The application has flushed its own state and knows a backup point exists | Guest agent + application participation (VSS on Windows, fs-freeze hooks on Linux), or stop mode |
Crash consistency is not nothing. Any modern journalling filesystem — ext4, XFS, NTFS, ZFS — recovers from a crash-consistent image. A restored guest will boot, replay its journal, and come up. The Linux course works through the same distinction from the guest side in application-consistent versus crash-consistent backups, which is worth reading alongside this if you are the person who has to convince an application owner that an image is not a database backup.
What crash consistency does not give you is the application’s invariants. A database that has written half of a multi-page update, an application that keeps an index file and a data file that must agree, a message queue mid-ack: these are consistent on disk in the filesystem sense and incoherent in the application sense. The filesystem replays cleanly and the application refuses to start, or worse, starts and serves wrong answers.
Making snapshot mode filesystem consistent
The agent is the whole difference, and it has two halves that people conflate:
the agent option on the VM (does PVE talk to the guest at all) and the
qemu-guest-agent package inside the guest (is there anything listening).
set -euo pipefail
VMID=100
# Host side: enable the channel. freeze-fs defaults to 1, so the freeze is on
# unless somebody has turned it off - which is worth checking rather than
# assuming, because a disabled freeze is invisible in the job report.
qm set "$VMID" --agent enabled=1,freeze-fs=1
# Guest side, Debian/Ubuntu:
# apt install qemu-guest-agent && systemctl enable --now qemu-guest-agent
# Guest side, RHEL family:
# dnf install qemu-guest-agent && systemctl enable --now qemu-guest-agent
# Windows: install the guest agent from the virtio-win ISO.
# The channel only appears after a full stop/start, not a reboot from inside.
qm stop "$VMID" && qm start "$VMID"With both halves present, a snapshot-mode backup issues guest-fsfreeze-freeze
before starting and guest-fsfreeze-thaw afterwards. Inside the guest the
kernel flushes and quiesces every frozen filesystem, so the image is taken at
a point where nothing is in flight.
# qm guest cmd 100 get-fsinfo[
{
"name": "sda1",
"mountpoint": "/",
"type": "ext4",
"used-bytes": 4831838208,
"total-bytes": 20961034240
}
]Illustrative output
set -euo pipefail
for vmid in $(qm list | awk 'NR>1 {print $1}'); do
configured=$(qm config "$vmid" | awk -F'[ ,=]' '/^agent:/ {print $2}')
[ "$configured" = "1" ] || { printf '%-6s agent-not-configured\n' "$vmid"; continue; }
status=$(qm status "$vmid" | awk '{print $2}')
[ "$status" = "running" ] || { printf '%-6s not-running-skip\n' "$vmid"; continue; }
if qm guest cmd "$vmid" ping >/dev/null 2>&1; then
printf '%-6s ok\n' "$vmid"
else
printf '%-6s CONFIGURED-BUT-NOT-ANSWERING\n' "$vmid"
fi
doneContainer modes are a different mechanism with the same names
The names are shared; the implementations are not, and the differences matter operationally.
| Mode | Container behaviour |
|---|---|
stop | The container is halted for the whole backup. Potentially long unavailability — unlike VM stop mode, this really is the full duration |
suspend | rsync copies the container to a temporary location, the container is suspended, a second rsync pass copies what changed, then it resumes. Short downtime, but it needs extra storage for the temporary copy |
snapshot | The container is suspended, a temporary snapshot of its volumes is taken, the snapshot content is archived, and the temporary snapshot is deleted. Requires a storage backend that supports snapshots |
Two consequences that are easy to miss:
Container stop mode is not the cheap operation VM stop mode is. There
is no background process taking over. Budget the whole backup duration as
downtime.
Container snapshot mode requires snapshot-capable storage. A container
on a plain directory storage cannot use it, and the job will fall back or
fail. That is a storage design constraint arriving through the backup
configuration, which is why it usually surprises people.
Choosing per workload
set -euo pipefail
# The fleet: live, no downtime, agent-quiesced.
vzdump --all 1 --exclude 205,206 \
--mode snapshot \
--storage pbs-main \
--prune-backups keep-daily=14,keep-weekly=8,keep-monthly=12 \
--notes-template '{{guestname}} nightly'
# The exceptions: two guests whose application cannot be reconstructed from a
# crash-consistent image, and which tolerate a two-minute restart at 03:00.
vzdump 205 206 \
--mode stop \
--storage pbs-main \
--prune-backups keep-daily=14| Workload | Mode | Why |
|---|---|---|
| Stateless web/app servers | snapshot | Crash consistency is sufficient; the state is elsewhere |
| Linux guest with a journalling FS and no database | snapshot + agent | Filesystem consistency is the whole requirement |
| PostgreSQL / MySQL / MSSQL | snapshot + agent, plus a native dump, or stop | The image restores; the database engine is what decides whether it starts cleanly. A native backup inside the guest is the application-consistent artefact |
| Windows with VSS-aware applications | snapshot + guest agent | The agent drives VSS, which is what makes the copy application consistent |
| Active Directory domain controller | snapshot + agent, and read the vmgenid material first | Restoring a DC from an image has failure modes beyond consistency |
| Appliance VM with an opaque embedded database | stop | You cannot reason about its consistency, so remove the question |
Knowledge check
Knowledge check · 4 questions
Q1. A VM backed up in stop mode takes 45 minutes to complete. How long is the guest unavailable?
Q2. Which of these produce a filesystem-consistent rather than merely crash-consistent VM backup? Select all that apply.
Q3. Container backups in stop mode have the same short downtime characteristic as VM backups in stop mode.
Q4. Which statement best describes the relationship between a snapshot-mode VM backup and a native database dump taken inside the guest?
Passing score: 75%. Answers are checked in this browser.