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
○Not yet marked complete on this device.
Why this matters in production
Containers are fast to provision and easy to migrate, but their security boundary is
weaker than VMs. This lesson covers the operational practices and the honest security
model.
Migration
Service impact possiblemove a container to another node— Both forms interrupt the container. --restart stops it, moves it and starts it; without a flag the container must already be stopped. Plan the downtime rather than discovering it.
set -euo pipefail
CTID=200
TARGET=pve-02
# Restart migration: PVE shuts the container down, moves it, starts it again.
# --timeout bounds how long it waits for a clean shutdown before forcing.
pct migrate "$CTID" "$TARGET" --restart 1 --timeout 180
# Offline migration of an already-stopped container.
# pct migrate "$CTID" "$TARGET"
pct config "$CTID" >/dev/null 2>&1 \
|| echo "container now lives on $TARGET"
Backups
Containers are backed up with vzdump, the same tool used for VMs:
vzdump 200 --storage pbs-main --mode snapshot
The three modes, as the documentation describes them for containers:
Mode
What it does
Downtime
Needs
stop
Stops the container for the duration of the backup
The whole backup
Nothing
suspend
rsync copies the data to a temporary location, then the container is suspended and a second rsync copies changed files, then it resumes
The second rsync pass
Free space for the copy, in --tmpdir
snapshot
Suspends the container briefly to ensure consistency, takes a storage snapshot, archives the snapshot, deletes it
Seconds
A snapshot-capable backend
Restore:
Data-loss riskrestore a container— Restoring over an existing VMID destroys that container's current disks. Restore into a free ID unless you have deliberately decided otherwise.
set -euo pipefail
NEWID=210
# List what is actually available before choosing a snapshot.
pvesm list pbs-main --content backup | grep '/ct/'
pct restore "$NEWID" \
'pbs-main:backup/ct/200/2026-08-12T02:00:03Z' \
--storage local-zfs
pct start "$NEWID"
pct exec "$NEWID" -- systemctl --failed --no-pager
A green backup job proves a backup ran. These prove a container can be
recovered from it.
Service impact possiblequarterly restore drill— Restores into a spare VMID on a test node. Uses a bridge that is deliberately isolated so the restored container cannot collide with the original on the network.
set -euo pipefail
SRC=200
DRILL=9200
SNAP='pbs-main:backup/ct/200/2026-08-12T02:00:03Z'
pct restore "$DRILL" "$SNAP" --storage local-zfs --unprivileged 1
pct set "$DRILL" --net0 name=eth0,bridge=vmbr-isolated,ip=192.0.2.50/24
pct set "$DRILL" --hostname "drill-$SRC"
pct start "$DRILL"
sleep 20
# The four checks that actually distinguish success from "it booted".
pct exec "$DRILL" -- systemctl is-system-running || true
pct exec "$DRILL" -- systemctl --failed --no-pager
pct exec "$DRILL" -- df -h /
pct exec "$DRILL" -- findmnt -no TARGET,SOURCE | grep -vE '^/(proc|sys|dev|run)'
# Time it, write the number in the runbook, then clean up.
pct stop "$DRILL"
pct destroy "$DRILL"
Record the elapsed time. That number, not an estimate, is the container’s
contribution to your RTO, and it is the input the RPO/RTO work in
RPO, RTO and dependency modelling
needs.
Common mistakes
Treating containers as VMs in security reviews.
Running privileged containers without documented justification.
Forgetting to test container restores.
Planning a maintenance window on the assumption that containers live-migrate.
Believing suspend mode checkpoints processes, and sizing --tmpdir
accordingly.
Restoring without checking whether the archive’s privilege setting is the one
you want.
Key takeaways
Containers are fast and efficient; their security boundary is weaker than VMs.
Container migration is a restart migration: plan the downtime, do not assume
a VM-style live move.
The three vzdump modes all pause the container; they differ in how long and
in what they need.
Bind and device mount point contents are never in the backup.
A restore is verified by exercising the workload, not by the task turning
green.
Knowledge check
Knowledge check · 5 questions
Q1. Which command moves a running container to another node, restarting it there?
Q2. Containers provide kernel isolation equivalent to VMs.
Q3. Which vzdump mode takes a storage-level snapshot rather than copying the container’s files?
Q4. How does vzdump suspend mode actually work for a container?
Q5. A container is restored from a PBS snapshot and the service starts but has lost all its history. Which are plausible causes? Select all that apply.
Passing score: 75%. Answers are checked in this browser.