OCI LXC Backup Test for Proxmox VE and PBS S3 Sync
Run an OCI LXC backup smoke test to verify Proxmox VE 9.2, PBS 4.2, and S3 sync before production, then confirm a verified remote restore from the S3 copy.

On this page
A targeted OCI LXC backup job is the smallest useful proof that Proxmox VE 9.2 can create a Proxmox Backup Server backup and that PBS 4.2 can copy it to an S3-compatible bucket. On my lab container, an 18 GB OCI LXC rootfs with about 1.1 GB of changed data took roughly 12 minutes for the first full backup, 4 minutes for the S3 sync, and under 4 minutes for a test restore. If that narrow path passes, you have a concrete signal before pointing production apps at the same schedule.
Key Takeaways
- Scope first: Test one OCI LXC, one PBS datastore, and one S3 sync job before adding namespaces, retention rules, or production guests.
- Stop mode: OCI LXC backups are more predictable with stop mode than snapshot mode, especially when overlay filesystems are involved.
- Sync is separate: A PVE backup job only proves the backup reached PBS; the PBS S3 sync job still has to run and succeed.
- Restore from remote: A green sync job is not proof until you restore the S3 copy and check a known file.
- Timing matters: Keep the test sync away from ZFS scrub windows and S3 lifecycle transitions.
Why a Tiny OCI LXC Job Is the Right Smoke Test
OCI LXC guests are often the first workloads people run on Proxmox VE 9.2: lightweight, fast to create, and easy to replace. That makes them a good target for a backup test, but they are not identical to a plain Debian VM. The backup path crosses several boundaries: the PVE backup command reads the container, PBS receives the chunks, and PBS later copies the namespace to an S3 remote.
A production app backup can hide a small failure because the job may be scheduled at 02:00 and nobody looks at it until a restore is needed. A tiny OCI LXC test gives you a fast feedback loop. It is small enough to run during the day, yet it exercises the same storage, backup, and sync components that your production containers will use.
If the OCI LXC is running Docker or another container runtime, put the test marker on a path you actually expect to back up. A marker file inside the OCI container rootfs is usually enough for this test, but if you bind mount a volume from the Proxmox host, decide whether that host path is supposed to be protected by PBS or by a separate host backup strategy.
If your S3 bucket already has retention or lifecycle rules, check them before the test. A rule that expires small objects or test prefixes can make a successful sync look like a failure later. The article on PBS 4.2 S3 lifecycle rules covers the patterns I keep in place for offsite PBS data.
How Do You Build a Throwaway OCI LXC Test Case?
Pick a container that fails loudly
Do not use a freshly created empty container if you can avoid it. I create a test OCI LXC with a known marker file and a small amount of changed data. The marker gives the restore test a simple answer: the hash matches, or it does not.
pct exec 101 -- sh -c 'printf "oci-s3-test\n" > /root/s3-marker.txt && sha256sum /root/s3-marker.txt'
Keep the workload small but not empty
My test container had an 18 GB rootfs, but only about 1.1 GB had changed since the last backup. That size is small enough to finish quickly, but large enough to catch storage path problems, PBS chunk ingest issues, and S3 request patterns that a 50 MB container might miss.
The goal is not to benchmark production. The goal is to make the test finish in minutes, not hours, so you can repeat it after PBS, PVE, storage, or network changes.
Give the test its own PBS namespace
I do not sync the root namespace for a first test. I put the OCI LXC backup into a PBS namespace such as oci-test, then create a sync job that only copies that namespace. This keeps the S3 bucket small and makes it obvious which objects belong to the test.
If you use a scheduled PVE backup job, keep the configuration simple. The important fields are the container ID, the PBS storage name, and stop mode.
backup: oci-lxc-s3-test
schedule daily
storage pbs-offsite
mode stop
vmid 101
That example is intentionally plain. Once the test passes, you can add retention, notes templates, or more guests. During the first pass, fewer variables make failure easier to diagnose.
What Should the Backup Job Prove?
A single backup job line in the Proxmox VE GUI is too coarse. I break the test into four checks. If one fails, the reason is usually obvious.
| Test step | What it proves | What it still misses | Common failure |
|---|---|---|---|
| PVE backup job | The OCI LXC can be read and pushed to the PBS storage | Whether PBS can copy the data to S3 | Wrong storage, stopped container too long, permissions |
| PBS datastore check | The backup exists in the intended local PBS datastore | Whether the sync namespace matches | Wrong datastore or namespace |
| PBS S3 sync job | PBS can copy the selected namespace to the S3 remote | Whether the remote copy is restorable | Wrong remote, wrong namespace, sync never runs |
| Restore from S3 copy | The remote copy contains a usable backup | Long-term retention and production load | Missing chunks, stale sync, bucket permissions |
This table is the part I keep near the PBS web interface when I am validating a new S3 remote. It stops me from treating a green backup job as proof of everything downstream.
How to Run the PBS S3 Sync Test Without Waiting for the Nightly Window
Trigger the PVE backup
First, confirm the backup job exists and points to the PBS storage. The command below lists cluster backup jobs from the Proxmox VE host.
pvesh get /cluster/backup --output-format yaml
Then run the OCI LXC backup manually. I use stop mode for the test because it produces a cleaner container image and avoids snapshot-mode surprises with OCI overlay filesystems.
vzdump 101 --mode stop --storage pbs-offsite --compress zstd
Replace the container ID and storage name with your own values. The important part is that the storage name is the PBS storage configured in Proxmox VE, not the PBS datastore name and not the S3 remote name.
Verify the backup landed in PBS
On the PBS host, check that the datastore is healthy and that the namespace contains the new backup.
proxmox-backup-manager datastore list
proxmox-backup-manager namespace list oci-test
If the namespace is not listed, stop before running sync. A sync job that copies the wrong namespace can still look successful while ignoring the test backup.
Run the S3 sync
PBS sync jobs are separate from PVE backup jobs. After the backup finishes, start the sync job from the PBS host or the PBS UI.
proxmox-backup-manager sync job run oci-lxc-s3-test
proxmox-backup-manager sync job list
If you want to confirm the S3 remote is configured correctly, list the remotes from the PBS host.
proxmox-backup-manager remote list
On my lab, the first full sync of the test namespace to an S3-compatible bucket took about 4 minutes. The next sync was much smaller because PBS only transferred changed chunks. That difference is a good sign: it means the remote is tracking the datastore instead of re-uploading everything.
If your PBS datastore sits on ZFS, do not run this test during a scrub if you can avoid it. The article on scheduling PBS sync around ZFS scrub explains how I keep sync, scrub, and ARC pressure from stacking up in the same window.
How Do You Prove the S3 Copy Is Restorable?
A successful sync job only proves PBS wrote data to the remote. It does not prove the remote copy can be used. For the OCI LXC test, I restore the backup from the S3-synced PBS datastore to a temporary Proxmox VE storage location, then start the restored container with a new ID.
Restore into a throwaway container
Use a new VMID, not the original test container. If you overwrite the source container, you lose the known-good state that proves the restore worked.
After the restore finishes, start the new container and check the marker file.
pct exec 102 -- sha256sum /root/s3-marker.txt
If the hash matches the value recorded before the backup, the S3-synced copy is usable for that test workload. If it does not match, treat the sync as unproven and inspect the PBS sync job log, the S3 bucket prefix, and the restore destination.
Compare the first pass to production expectations
The restore will usually be faster than the first full sync because it only needs the chunks for one container and one restore path. If your production containers are much larger, do not extrapolate from this test to a full datastore restore. Use this test to prove correctness, then run a larger restore benchmark. For that, the PBS S3 restore benchmark is a better fit.
What Are the Gotchas and Tradeoffs?
Gotcha: the sync job can be green while copying the wrong data
My first PBS 4.2 S3 test had a boring failure: the PVE backup job succeeded, the PBS sync job succeeded, and the sync log showed a completed run. The problem was that the sync job namespace did not match the namespace receiving the PVE backup. The remote got a valid copy of the wrong namespace, which happened to be almost empty.
That failure is easy to miss because both jobs report success. I now write the namespace name in the sync job notes and check the remote namespace in the PBS UI before I trust the run.
Gotcha: rate limits can make a small test look broken
PBS sync jobs can be rate limited. That is useful when you want to protect a production network, but it can make a tiny test crawl. A 1.1 GB changed dataset should not take an hour on a normal connection. If the first sync is unusually slow, check the sync job rate limit before blaming the S3 provider.
Tradeoff: stop mode is safer for OCI LXC, but less polite
Stop mode is the honest choice for this test because it avoids asking snapshot mode to produce a consistent image from a container runtime that may have overlay mounts, bind mounts, or app state that does not behave like a normal LXC guest. The cost is downtime. For a throwaway container, that does not matter. For a production OCI LXC, you need to know whether a few seconds or minutes of stop time is acceptable.
Snapshot mode can be faster and less disruptive, but it can also produce backups that restore cleanly and still fail to start if the container runtime expects state that was not captured. For the S3 sync proof, I would rather have a boring, stopped backup than a fast backup that gives false confidence.
Tradeoff: S3 sync adds delay and cost, but keeps local restores fast
Keeping PBS as the first stop gives you fast local restores. The S3 sync adds object storage request cost and a second copy delay, but it protects you when the PBS host, ZFS pool, or local datastore has a bad day. The test should be narrow enough that you can run it often without making the S3 bill or the PBS sync window a problem.
Conclusion
A targeted OCI LXC backup job proves more than a checkbox in the Proxmox VE GUI. It confirms the PVE backup path, the PBS datastore, the PBS 4.2 S3 sync job, and the restorability of the remote copy in one short exercise. Your next step is to repeat the same test after any PBS, storage, network, or lifecycle change, then move on to a larger restore benchmark before production apps depend on the S3 copy.


