Add a central management spot for restoring or finally deleting files and folders.
Recommended setup
-
Enable bucket versioning on the storage bucket.
-
On delete, create an app-level trash record and optionally a delete marker by deleting the current version.
-
Keep noncurrent versions for a fixed retention window with lifecycle rules.
-
Optionally move older trash data to cheaper storage classes before final purge, if restore speed requirements allow it.
-
Periodically purge expired trash and monitor noncurrent-version bytes with Storage Lens.
When this becomes expensive
It gets costly when your objects are large, deletions are frequent, and retention is long. It also gets expensive when users repeatedly overwrite the same keys, because every overwrite creates another billable version unless you expire old ones. If you replicate versions for disaster recovery, multiply that storage footprint across regions.
Add a central management spot for restoring or finally deleting files and folders.
Recommended setup
Enable bucket versioning on the storage bucket.
On delete, create an app-level trash record and optionally a delete marker by deleting the current version.
Keep noncurrent versions for a fixed retention window with lifecycle rules.
Optionally move older trash data to cheaper storage classes before final purge, if restore speed requirements allow it.
Periodically purge expired trash and monitor noncurrent-version bytes with Storage Lens.
When this becomes expensive
It gets costly when your objects are large, deletions are frequent, and retention is long. It also gets expensive when users repeatedly overwrite the same keys, because every overwrite creates another billable version unless you expire old ones. If you replicate versions for disaster recovery, multiply that storage footprint across regions.