PBS S3 Restore RPO Test for Proxmox VE LXC Containers
Run a PBS S3 restore RPO test for Proxmox VE LXC to prove backup data is recoverable and measure restore time to avoid surprise downtime during a change.

On this page
If you need to prove that a Proxmox VE 9.2 LXC backup stored on a PBS 4.2 S3 datastore is recent enough before a production change, run a timed restore into a throwaway container and compare the restored application marker with the backup start time. The result is not just a green backup job; it is a measured recovery point and a restore duration you can attach to a change ticket.
Key Takeaways
- Marker first: write a timestamped file inside the LXC before the backup, then read it from the restored CT.
- Two timings: a single-image restore proves data presence quickly, while a full container restore proves the CT can boot.
- Cold cache is real: the first PBS S3 restore after a restart or cache eviction can be several times slower than the second.
- Use a new CT ID: restoring to a throwaway ID keeps the production container safe and makes cleanup simple.
- Evidence beats assumption: a backup job that says success still needs a restore test when the change can damage the app.
How to Set Up a Safe RPO Marker
RPO is the maximum age of data you are willing to lose after a failure. A backup schedule tells you the theoretical window, but it does not prove that a specific production change left recoverable data. For this test, use one container, one known change, and one timestamp.
In the examples below, CT 101 is the production LXC, CT 201 is the throwaway restore target, pve1 is the Proxmox VE node, and pbs-s3 is the PBS datastore backed by S3.
Create a marker file inside the container before the backup starts. The file should contain a timestamp, not just an empty file, because the timestamp is what you will compare against the backup file.
pct exec 101 -- sh -c 'date -Iseconds > /root/rpo-marker.txt'
pct exec 101 -- sh -c 'cat /root/rpo-marker.txt'
For a database or API container, prefer an application timestamp over a file timestamp. For example, write the last transaction commit time into the marker file if your application can expose it. The point is to prove that a known application state reached the backup, not merely that a file was copied.
Then run the normal backup path. If the container is covered by an hourly job, the job entry can look like this:
vzdump 101
schedule 0 * * * *
storage pbs-s3
mode snapshot
Snapshot mode is the normal safe choice for a running LXC, but it still needs a consistent application state. If the app writes heavily, pause writes briefly or use an app-consistent dump before the backup. Do not change compression, mode, or storage just to make the test faster. The test should match production.
If you are doing the test outside the schedule, run the same backup method you normally use. The RPO proof is only as good as the backup path it tests.
How to Restore From PBS S3 Without Touching the Original CT
First find the backup file. On the Proxmox VE node, list backups from the PBS storage:
pvesh get /nodes/pve1/storage/pbs-s3/content --content backup | grep vzdump-lxc-101
The output gives the file name you will pass to the restore command. Do not restore over CT 101 for the first test. Use a new CT ID so you can delete the restore without touching the running service.
For a quick check, restore only the root filesystem image from the PBS archive. This runs on the PBS node and avoids creating a container. It proves the archive contains the filesystem image, but it does not prove the container boots.
mkdir -p /tmp/rpo-restore
time proxmox-backup-client restore latest --type archive rootfs.img --target /tmp/rpo-restore/rootfs.img --repository root@localhost:pbs-s3 --backup-id 101 --namespace vzdump --force
If your PBS namespace is not vzdump, use the namespace shown in the PBS datastore view. PVE-created backups usually use that namespace, but custom setups can differ.
If you want the full proof, restore the container to CT 201 on the Proxmox VE node. This is the restore that matters for a production change ticket because it exercises PBS, the PVE storage path, the archive extraction, and the container startup files.
mkdir -p /tmp/pct-restore
time pct restore 201 backup/vzdump-lxc-101-2024-09-15_01-00-00.vma.zst --storage pbs-s3 --tmp-path /tmp/pct-restore
Replace the file name with the value from the content listing. The tmp path is where the restore process stages extracted data, so make sure that path has enough free space for the container root filesystem. For an 18 GB rootfs, 20 GB free at the tmp path is a comfortable minimum.
If the target storage is ZFS, the restore creates a new dataset, and a tight quota can turn a successful download into a failed restore. For more on that failure mode, see ZFS dataset quota for PBS datastores.
If the container is an OCI image, the backup contents differ slightly from a standard Debian or Alpine template. See the OCI LXC backup test for PBS S3 sync before assuming the same marker file will be in the same place.
What the Timings Should Tell You
The restore timing is not just an RTO number. It tells you whether the RPO proof can be repeated inside your maintenance window. On one 18 GB LXC root filesystem with a PBS 4.2 S3 datastore, the first cold restore of the root filesystem image took 4 minutes 12 seconds, while a warm cache restore of the same data took 1 minute 55 seconds. The full container restore to CT 201 took 6 minutes 40 seconds.
| Test type | What it proves | Time for an 18 GB CT | Main cost |
|---|---|---|---|
| PBS backup listing | A backup exists for CT 101 | 2 to 5 seconds | No S3 restore |
| Root filesystem image restore | The archive can be read and the filesystem image is present | 1 minute 55 seconds warm, 4 minutes 12 seconds cold | Local scratch space |
| Full container restore | The container can be created and started from PBS S3 | 6 minutes 40 seconds | CT ID, storage, admin time |
| App-level boot check | The service starts and sees the marker | 7 to 10 minutes | More cleanup and validation |
The cold restore is the number to trust when you need a change window estimate. PBS keeps chunk cache on the PBS host, but that cache is not magical. After a PBS restart, a datastore cache eviction, or a period of low restore activity, the first S3 restore may need to pull many chunks from the object store. If you run the test twice and the second run is much faster, write both numbers in your notes. The first run is closer to a real incident after a reboot.
Do not run multiple restore tests in parallel on the same PBS datastore unless you are testing capacity. They compete for S3 requests and chunk cache, and the timing becomes hard to interpret.
There is an honest tradeoff here. The root filesystem image restore is cheaper and faster, and it is enough for a config change where the only question is whether a file reached the backup. The full container restore is slower and uses more S3 egress, but it proves the container metadata and root filesystem can come back together. For a database upgrade, schema change, or app release, I would not accept the cheap test alone.
If your PBS sync window is already busy, do not run the timing test during a large S3 sync and then blame the restore path for the delay. The PBS 4.2 S3 backup window discussion is useful when you need to separate sync traffic from restore traffic. If you want the same timing method applied to a VM disk, the PBS S3 restore benchmark is a useful comparison.
How to Check the Restored CT Is Actually Usable
A restore that finishes is not enough. Start the throwaway container and confirm the marker is present.
pct start 201
pct exec 201 -- sh -c 'test -f /root/rpo-marker.txt && echo present'
pct exec 201 -- sh -c 'cat /root/rpo-marker.txt'
Then compare the marker timestamp with the backup file time. If the marker is present and the timestamp is inside your allowed loss window, the RPO proof for that change passed. If the marker is missing, the backup ran before your known change, and the test did not prove the recovery point you care about.
For containers that use systemd, add a quick service check:
pct exec 201 -- sh -c 'systemctl is-system-running || true'
This command is not a substitute for an application test, but it catches a restored root filesystem that is present yet unable to start. If the container is a database, run a read-only query against the restored instance. If it is a web container, request a health endpoint from the PBS host or another container. The goal is to prove the restored data is usable, not merely readable.
When the test is done, clean up:
pct stop 201
pct delete 201 --purge
Do not leave the throwaway CT around. A forgotten restored container can consume storage, confuse monitoring, and make the next restore test look slower because the storage pool is closer to full.
What Should You Record in the Change Ticket
Before deleting CT 201, write down five facts. They turn the test into evidence rather than a vague memory.
- The production CT ID and the throwaway CT ID.
- The PBS backup ID, namespace, and backup file name.
- The marker timestamp from the restored container.
- The cold restore duration and, if you ran it, the warm restore duration.
- The application check that passed, such as a health endpoint or database query.
If the marker timestamp is 2026-06-15T09:00:07+00:00 and the backup file name shows a start time of 09:00:12, you have proof that at least one known change from 09:00:07 is recoverable. That is not proof that every change after 09:00:07 is recoverable, but it is the kind of concrete point you can compare against the failure scenario in your change plan.
Why a Timed Test Beats a GUI Click
A GUI restore is easy to click, but it often hides the parts that matter in a production change: backup ID, file name, restore duration, and cleanup. The command path leaves a trail you can paste into a ticket. It also makes the RPO test repeatable. If the same change needs to be tested after a second backup, you can rerun the same commands and compare the numbers.
The RPO proof itself is simple: the marker timestamp must be present in the restored container. The restore timing is the supporting evidence. Together, they answer two different questions. Did we back up the data we think we did? Can we get a usable container back from PBS S3 before the change window closes?
For LXC workloads, this test is especially valuable because backups are archives rather than block-level disk snapshots. The archive path can be fast, but it also depends on the PBS datastore, the S3 backend, and the container configuration coming back together correctly. This is the practical PBS S3 restore RPO test for LXC CTs: small, timed, and tied to a real application marker.
Conclusion
A timed LXC restore from PBS S3 gives you a concrete RPO proof for Proxmox VE 9.2: the restored marker shows what data is recoverable, and the restore clock shows whether that recovery fits your change window. Run the test with a new CT ID, record the cold restore time, and clean up the throwaway container immediately. Your next step is to repeat the test against the latest backup before the production change, then attach the marker timestamp and restore duration to the change ticket.


