Pcornel
Browse topics
Options
Recent
Favorites
Storage · Technical reference

Object Versioning

Direct answer

Object versioning keeps every version of an object when it is overwritten or deleted, so earlier versions can be restored. Deletes add a delete marker, and old versions still use space until lifecycle rules expire them.

When to use this

Use this when objects need recoverable history.

First 30 seconds

1. Versioning keeps previous versions and delete markers.

2. Protects against overwrite/delete.

3. Costs storage — combine with lifecycle (noncurrent expiration).

4. Can be suspended, not disabled.

5. Restore by copying an old version.

Operational verification

PUT/DELETE → new version/delete marker

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Object storage
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformObject storage
Scope / prerequisiteUse this when objects need recoverable history.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Common mistakes Narrow the fault
  • Versioning without lifecycle rules, so storage grows forever.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Every overwrite or delete keeps a version.
  • Delete adds a delete marker.
  • Old versions use space until expired.
Key checks
  • aws s3api get-bucket-versioning --bucket <b> — status
  • aws s3api list-object-versions --bucket <b> --prefix <k> — versions
  • aws s3api put-bucket-versioning --bucket <b> --versioning-configuration Status=Enabled — enable
ReferenceHow it works1 section · depth on demand

Reference

Restore an old version by copying it over the current one: aws s3api copy-object --bucket b --key f --copy-source b/f?versionId=<id>.

ReferenceImportant terms & boundaries3 sections · depth on demand

In depth

Versioning keeps every version of every object

The AWS S3 documentation describes three bucket states: unversioned (the default), versioning-enabled and versioning-suspended. Once enabled, versioning can only be suspended, never returned to unversioned. Every new object version gets a unique version ID. Objects that existed before have the version ID null.

$ aws s3api put-bucket-versioning --bucket backups-prod --versioning-configuration Status=Enabled
$ aws s3api get-bucket-versioning --bucket backups-prod
{ "Status": "Enabled" }
$ aws s3api list-object-versions --bucket backups-prod --prefix db/app.dump
{ "Versions": [ { "Key": "db/app.dump", "VersionId": "3HL4kqtJlcpXroDTDmJ+rmSpXd3dIbrH", "IsLatest": true }, ... ],
  "DeleteMarkers": [] }
$ aws s3api get-object --bucket backups-prod --key db/app.dump --version-id <older-id> app.dump.old

Behaviour (AWS documentation)

ActionResult
OverwriteNew version; the previous one stays as noncurrent
Delete without a version IDA delete marker becomes the current version; data remains
Delete with a version IDThat version is permanently removed
CostEvery version is a full stored copy and is billed

Use lifecycle rules with versioning

AWS recommends combining versioning with lifecycle rules. When moving from an unversioned bucket with an expiration rule, add a noncurrent version expiration, or old versions are never removed.

Recovery uses

  • Undo an accidental overwrite: copy the previous version back as current.
  • Undo a delete: remove the delete marker.
  • Ransomware that overwrites objects creates new versions, so older ones stay recoverable. That holds only if the attacker cannot delete versions; for that, combine versioning with Object Lock.

S3-compatible systems (MinIO, Ceph RGW) support the same API, but check their version-specific behaviour.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Quick reference

With versioning enabled, every overwrite creates a new version and a delete adds a delete marker instead of removing data. Older versions remain until a lifecycle rule expires them, so storage use grows. Versioning is required for replication and object lock.

aws s3api put-bucket-versioning --bucket backups --versioning-configuration Status=Enabled
aws s3api list-object-versions --bucket backups --prefix db/

Reference

aws s3api put-bucket-versioning --bucket b --versioning-configuration Status=Enabled
aws s3api list-object-versions --bucket b --prefix file

Documented example, not captured output. Deletes create delete markers; old versions remain until lifecycle rules expire them.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docObject storage current

Authoritative/upstream documentation reviewed for bounded claims in Object Storage → Object Versioning. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.snia.org/tech_activities/standards/curr_standards/cdmi · confidence 94%
Confirmation

Confirm action

Continue?