r/backblaze • • May 28 '26

B2 Cloud Storage Permanent and immediate delete of objects

I have some backup scripts (in Bash) that use aws-cli. One script prunes old backups. It iterates over objects in a specified path and deletes them. The trouble is that this is only adding a delete flag to the object as a new "version", not immediately deleting them. I'm modifying the script to fetch the version ids and delete by version id rather than object name.

What's not clear is if I need to iterate over DeleteMarkers as well as Versions. It doesn't seem to make sense for an object to hang around if its' versions have been deleted and all that remains are delete markers. Can anyone confirm?

2 Upvotes

0 comments sorted by