A Note: Deleted PBS Storage on PVE, Pruned all Backups from PBS, Re-Added PBS Storage to PVE … PVE thinks old backups are still there (temporarily)?

Sep 1, 2022
482
182
48
41
Hello,

Just a note for anyone else to help them avoid a blood pressure spike. :)

I previously had my PVE host configured to backup to a @tuxis free PBS instance. After a bit of testing with some throwaway VMs, I had it all working but realized I'd forgot to apply client-side encryption. I also wanted to switch to an API token to authenticate to Tuxis.

So, I deleted the PBS storage from PVE, and on the PBS server itself, deleted, GC'd, and pruned the backed up files.

I re-added the PBS storage to PVE with client-side encryption enabled, and … PVE still thought all the pruned backups still existed, and showed the space as used. That was rather freaky and got my blood pumping for a moment, as it seemed that, like Palpatine, the pruned backups had somehow returned. But after five minutes or so, PVE seems to have synced up to the PBS server and realized the storage is in fact empty.

I'm assuming this is normal, and the delay, if anything, is caused by me being in Texas, United States, and Tuxis' server being in Amsterdam in the Netherlands.

I wonder if it might be worthwhile to request a PVE feature enhancement to "mark as new" a PBS storage when it's added, so PVE doesn't attempt to load cached data about previous backup history and goes straight to starting fresh...
 
Clarification:

Those backups were GC'd and pruned two months ago, and the PBS server had not been connected to my PVE node since then. The PBS server correctly showed everything that had been pruned as deleted and gone.

The PVE node was not connected to the PBS server when the backups were GC'd and pruned.

So, when I re-connected the PVE node to the PBS server, I was surprised to see PVE list the "content" of the PBS Storage as still containing all the things I knew had been deleted.

The cache'd listing of backups on the PVE side disappeared about 5 minutes later, and PVE showed the correct current state of the PBS node.

My OP here was just to alert people who reconnect previously disconnected PBS servers to their PVE nodes not to be shocked and dismayed when a bunch of pruned files temporarily re-appear. :P
 
PVE doesn't (yet ;) - see https://bugzilla.proxmox.com/show_bug.cgi?id=3045) cache storage listings like that.. are you sure it wasn't just your browser showing you the old view before you refreshed or something like that?
Interesting. It must have been client-side caching? I know the PBS storage was empty.

That's actually annoying. I wonder if there's a way I can tell my browser never to cache certain domains. I'd prefer to know the current state of my storages. :)
 
note that the data loading and rendering happens client side in javascript, the only way I can see this happening is if you had a tab open previously and the browser didn't refresh it.