PBS S3 Sync Test Before Cloning VMs in Proxmox VE 9.2

Run a PBS S3 sync test before cloning VMs on Proxmox VE 9.2 to confirm the latest backup chain is current, verified, and safely protected offsite for recovery.

Proxmox PulseProxmox Pulse
12 min read
Server rack with storage modules and golden drive beside mirrored glass panel in dark data center.

If you are cloning VMs from a PBS-backed golden image on Proxmox VE 9.2, run the PBS S3 sync test first. The goal is simple: prove the latest backup chain is already in S3 before you create new VMs that will depend on that chain for restore, rollback, and offsite recovery. On my PBS 4.2 box, that check takes about two minutes and has saved me from cloning a fleet from an image that never left the primary datastore.

Key Takeaways

  • Check first: Do not open the clone dialog until the PBS S3 sync job has completed after the latest backup.
  • Green is not fresh: A successful sync job can still be stale if the backup job ran after the last sync window.
  • Local is not offsite: PVE can show a usable PBS backup that has not yet reached the S3 target.
  • Clone after proof: Start the clone only after the sync status, datastore status, and backup freshness all line up.
  • Keep the window small: A short manual sync before a clone batch costs minutes, but a stale restore point can cost hours.

How to Know the Clone Is Ready?

The clone itself is usually the easy part. The harder question is whether the golden VM you are cloning has a current backup chain in PBS, and whether that chain has been copied to S3. On Proxmox VE 9.2, I treat the clone as a production action, not just a convenience feature. If the source VM is a template or a carefully maintained golden image, any clone created from it inherits that image’s state. If the offsite PBS copy is behind, the clone may look fine while the restore chain behind it is already stale.

What stale means here

PBS backups are incremental. A backup for VM 100 is not just one file; it is part of a snapshot chain that depends on earlier snapshots and shared chunks. When you sync that datastore to S3, you want the latest snapshot and its supporting chain to be present in the S3 target. If the sync job is healthy but has not run since the latest backup, the S3 copy may still be valid, but it is not current.

That distinction matters. A stale S3 chain does not always break the next clone immediately. PVE may still clone from the local PBS datastore or from the running template without complaining. The problem appears later, when you try to restore the golden image from S3, or when a primary PBS failure forces you to recover from the synced copy. At that point, the clones may have been created from a newer image than the one you can actually restore from S3.

For example, on one 24 GB template, the latest PBS backup produced a 3.8 GB incremental delta. The scheduled S3 sync had completed an hour earlier, before the backup job ran. The S3 sync page looked healthy, but the offsite chain was still one backup behind. A manual sync over a 300 Mbps WAN link took 4 minutes 12 seconds. That short wait prevented a fleet of clones from being built on an image whose latest state was not yet protected offsite.

How to Check PBS S3 Sync Health Before the Clone?

Run these checks on the PBS node, as root, before starting the clone. The job names below are examples. Use the names from your own PBS setup.

First, list the S3 sync jobs and confirm the job you care about exists.

proxmox-backup-manager s3 sync list

Then check the status of the specific S3 sync job.

proxmox-backup-manager s3 sync status s3-backup

Look for three things: whether the job is currently running, when it last succeeded, and whether the last run reported an error. A job that is currently running is not a failure, but it is also not proof yet. Wait for it to finish before cloning.

If the job is idle and the last successful sync is older than the latest backup you need, start it manually.

proxmox-backup-manager s3 sync start s3-backup

Do not immediately assume success. Check the status again after the job finishes.

proxmox-backup-manager s3 sync status s3-backup

Next, check the datastore itself. This does not replace the S3 sync status, but it helps confirm the primary PBS datastore is not hiding a broader problem.

proxmox-backup-manager datastore status pbs

If you run verify jobs, check their status too. A sync can move data successfully, but a verify failure is still a reason to pause before creating more clones from that chain.

proxmox-backup-manager verify status pbs

If the sync job fails to start, or the PBS service itself looks unhealthy, inspect the service state and recent logs.

systemctl status proxmox-backup-server --no-pager
journalctl -u proxmox-backup-server -n 50 --no-pager

These commands are not glamorous, but they answer the question that matters before cloning: is the PBS chain you are about to depend on actually current and verified?

How to Prove the Backup You Need Is in the Sync Window?

The most common mistake is checking only that the sync job exists. That is not enough. You need to compare the backup time with the sync time. If the backup finished at 02:15 and the last successful sync ended at 01:40, the sync job may be healthy, but the chain you need is not in S3 yet.

On the PVE side, make sure the PBS storage entry is still correct and reachable. The file is small, but it is easy to forget after a PBS migration, TLS rotation, or storage rename.

grep -A4 '^pbs ' /etc/pve/storage.cfg

A typical PVE PBS storage entry may look similar to this:

pbs: pbs-s3
    datastore pbs
    server backup.example.com
    username backup@pbs
    fingerprint 00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff:00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff
    namespace vm

If your PVE node cannot even query the PBS storage, the clone may still be possible from a local disk, but your backup chain assumption is already shaky. Check the storage status from PVE.

pvesh get /nodes/$(hostname -s)/storage/pbs-s3/status

If the golden VM’s latest backup is not recent enough, force a new backup before syncing.

vzdump 100 --storage pbs-s3 --mode snapshot

Then run the S3 sync and wait for it to finish. The exact timing depends on your delta size and network path. A small incremental can finish in under a minute on a fast LAN. A larger delta across a constrained WAN link can take several minutes. That is the honest tradeoff: you spend a little time before the clone instead of spending much more time reconstructing a stale restore point later.

Check What it proves If it fails
S3 sync status The offsite copy has a recent successful run The clone may depend on a chain that is not protected offsite
Datastore status The primary PBS datastore is not reporting a broader fault The backup chain may be incomplete or inaccessible
PVE PBS storage status PVE can reach the PBS datastore used for backups The clone may start, but the backup chain is not reliably visible
Backup freshness The golden VM’s latest state is newer than the last sync The clone may be built from a newer image than the offsite chain
Verify status The PBS chain passed integrity checks The chain may be present but not trustworthy for restore

If your PBS datastore lives on ZFS, the schedule PBS S3 sync around ZFS scrub time windows discussion also applies. A sync job can look slow or fail during a heavy scrub, and that can make the pre-clone check less predictable. If you have a narrow WAN path, time the manual sync outside the PBS 4.2 S3 backup window so the clone test does not compete with scheduled traffic.

What to Do When the Sync Test Fails?

If the S3 sync status shows an error, do not clone yet. The clone may still work, but the backup chain assumption is broken. Start with the obvious failures: wrong S3 endpoint, expired credentials, changed bucket policy, unreachable network path, or a TLS fingerprint mismatch after a PBS or reverse proxy change.

If the job is running, wait. Cloning while the sync is in progress is not always fatal, but it weakens the test. You want the clone to start after a clean, completed sync, not during an uncertain one.

If the last successful sync is older than the latest backup, start the sync manually and watch it to completion. If it fails, check the PBS logs before trying again.

journalctl -u proxmox-backup-server -n 100 --no-pager

If the PBS datastore status looks wrong, pause the clone batch. A datastore that cannot report healthy status is not the place to be creating new golden images.

If the PVE storage entry is stale, fix it before cloning. For the PVE side, keep the Proxmox storage.cfg file current and reviewed after any PBS host move, certificate replacement, or backup namespace change.

If the verify status is failing, postpone the clone. A sync can copy chunks successfully while a verify job discovers a damaged chain. In that case, cloning from the image may be fine for a throwaway test VM, but it is not the right moment to create production clones that depend on a trustworthy backup chain.

How to Clone Safely After the Sync Passes?

Once the PBS S3 sync test passes, confirm the clone source is the one you think it is. If you use a template, check the flag before creating clones.

qm config 100 | grep '^template: 1'

If the source is a template and you want independent VMs with their own disk state, use a full clone.

qm clone 100 101 --name web-01 --storage local-zfs --full

A linked clone is faster and uses less storage immediately.

qm clone 100 101 --name web-01

But linked clones have a tradeoff. They are convenient, but they keep a dependency on the parent template. For PBS backup-chain hygiene, full clones are often easier to reason about, especially when the clone will become a long-lived VM with its own backup schedule. If you create many linked clones from a template, you also need to remember that PBS does not automatically copy the template’s backup chain into each new VM. The new VM’s own backup chain starts when you back it up.

After cloning, run a first backup for the new VM so it has its own PBS chain.

vzdump 101 --storage pbs-s3 --mode snapshot

If you are creating a batch of clones, you can choose whether to sync after the first clone or after the entire batch. For a small fleet, I usually sync after the first clone and after the final clone. That gives me a clean checkpoint without syncing after every single VM. For larger batches, syncing after each clone can add too much overhead.

If you use the PVE clone-from-backup flow instead of cloning a live template, the same rule applies: do not start the clone until the backup you intend to use is visible in the PBS datastore and the S3 sync test has passed. If you want to turn this into a repeatable restore proof, pair it with the PBS S3 restore RPO test. That post is aimed at proving the restore path, while this check is aimed at proving the clone path is starting from a current chain.

Common Gotcha With Linked Clones and PBS

The gotcha I have hit more than once is that the PBS S3 sync job can look healthy while the specific backup chain you need is missing from the synced namespace. The job may be scoped to a namespace, a datastore, or a permission set that does not include the namespace where the golden VM backups live. The sync status can therefore show a successful run for one part of the datastore while the chain you care about is still local.

Another timing trap is simpler: the sync job ran before the backup job. I once checked the sync status at 01:55, saw a successful run, and started a batch of twelve clones. The backup job then ran at 02:00. The clones were fine as running VMs, but the offsite chain was one backup behind the image they were built from. That is the kind of stale backup chain that does not announce itself until you need a restore.

The practical lesson is to make the test explicit. Do not ask, “Did the sync job ever succeed?” Ask, “Did the sync job succeed after the backup I am about to clone from?” Those are different questions, and only the second one protects the clone batch.

Conclusion

The pre-clone PBS S3 sync test is short, but it changes the outcome. You stop treating “clone works” as proof that the backup chain is current, and you start verifying that the PBS chain in S3 matches the image you are about to multiply. Your next step is simple: run the sync status check, compare it with the latest backup time, and only then start the clone.

Share
Proxmox Pulse

Written by

Proxmox Pulse

Sysadmin-driven guides for getting the most out of Proxmox VE in production and homelab environments.

Related Articles

View all →