S3-compatible storage per TB · no API fees · encrypt before upload · pay in BTC, USDT, USDC, ETH, SOL, LTC, XMR
Get storage

Tutorial · S3 versioning · checked 17 November 2026

How do I turn on S3 versioning?

Last updated: · 5 min read

Quick answer

How do I turn on S3 versioning?

Run aws s3api put-bucket-versioning --bucket BUCKET --versioning-configuration Status=Enabled, or rclone backend versioning remote:BUCKET Enabled. From then on, overwrites and deletes keep the old version. On a PrivateS3 bucket versioning is self-service and free, but every old version counts toward the plan's quota, from 1 TB.

In brief
  • Three states: unversioned (default), Enabled, Suspended; once enabled, a bucket never returns to unversioned, per rclone's docs.
  • Delete with versioning adds a delete marker; the data stays as an older version.
  • Cost: AWS says each version is the whole object, billed in full. At PrivateS3: S3 versioning can be turned on per bucket from any S3 client; old versions count toward the quota.
  • Cleanup: a lifecycle rule expires noncurrent versions after N days.

What changes for an object when versioning is on?

Effect of upload and delete on an S3 object with and without versioning, per the Amazon S3 user guide
ActionUnversionedVersioning enabled
Upload over an existing keyOld data replacedNew version added; old one kept as noncurrent
Delete without a version IDObject removedDelete marker added; versions kept
Delete with a version ID—That version removed for good
Version ID of new objectsnullUnique ID

How do you turn versioning on with the AWS CLI?

Send put-bucket-versioning with Status=Enabled to the bucket, using the seller's endpoint. The AWS CLI reference, read on 17 November 2026, gives this command and notes that a bucket with versioning set can only be Enabled or Suspended afterwards. The endpoint and region are shown with the keys in the client area.

AWS recommends waiting 15 minutes after the first activation before writing to the bucket, since the change can take time to spread on Amazon S3.

Enable, then check
aws s3api put-bucket-versioning \
  --bucket BUCKET \
  --versioning-configuration Status=Enabled \
  --endpoint-url https://s3.privates3.com

aws s3api get-bucket-versioning --bucket BUCKET --endpoint-url https://s3.privates3.com

How do you turn versioning on with rclone?

Use the S3 backend command rclone backend versioning. The rclone S3 docs say that without an argument it reports the status, and with Enabled or Suspended it sets it first. They also document --s3-versions to show old versions in listings and --s3-version-at to see the bucket as it was at a date. The rclone page sets up the privates3 remote.

rclone versioning commands
rclone backend versioning privates3:BUCKET           # read status
rclone backend versioning privates3:BUCKET Enabled   # turn on

rclone ls privates3:BUCKET --s3-versions             # list old versions too
rclone ls privates3:BUCKET --s3-version-at 2026-11-10

How do you find and restore an old version?

List the versions of the key, then download the one you want by its version ID. The AWS CLI's list-object-versions returns Versions and DeleteMarkers, each with a VersionId and an IsLatest flag. The S3 user guide says a GET with a version ID returns that version even when a delete marker is current.

In Cyberduck, View → Show Hidden Files shows old versions and File → Revert restores one; the Cyberduck guide has the details.

List versions of one key, then fetch an old one
aws s3api list-object-versions --bucket BUCKET --prefix reports/q3.xlsx \
  --endpoint-url https://s3.privates3.com

aws s3api get-object --bucket BUCKET --key reports/q3.xlsx \
  --version-id VERSION_ID q3-restored.xlsx --endpoint-url https://s3.privates3.com

How do you stop old versions from filling the quota?

Add a lifecycle rule that expires noncurrent versions after a number of days. The AWS CLI reference for put-bucket-lifecycle-configuration documents NoncurrentVersionExpiration with NoncurrentDays and NewerNoncurrentVersions. The rule below deletes versions 30 days after they stop being current, while always keeping the 3 newest.

This matters at PrivateS3, where the quota is hard: The plan size is a hard quota: an upload that would pass it is refused with a QuotaExceeded error, nothing is billed on top. Do not add this rule to a bucket used by Veeam: Veeam's help center says lifecycle rules are not supported there. According to PrivateS3's survey of 17 November 2026, PrivateS3 bills no early-deletion fee, so expiring versions frees quota at once.

lifecycle.json and the command that applies it
cat > lifecycle.json <<'EOF'
{
  "Rules": [
    {
      "ID": "expire-old-versions",
      "Filter": { "Prefix": "" },
      "Status": "Enabled",
      "NoncurrentVersionExpiration": { "NoncurrentDays": 30, "NewerNoncurrentVersions": 3 }
    }
  ]
}
EOF

aws s3api put-bucket-lifecycle-configuration --bucket BUCKET \
  --lifecycle-configuration file://lifecycle.json --endpoint-url https://s3.privates3.com

S3 versioning: common questions

Can I turn versioning off again?

You can suspend it, not remove it. Existing versions stay until you delete them or a lifecycle rule expires them.

Is versioning the same as Object Lock?

No. Versioning keeps old copies, but anyone with the keys can delete them. Object Lock blocks deletion until a date; Object Lock (immutable backups) is set on a new bucket on request through a support ticket.

Do old versions cost extra at PrivateS3?

No separate fee, but they use quota. AWS's guide notes each version is a full copy, not a diff.

Does restic need bucket versioning?

No, restic keeps its own snapshots. Versioning adds protection if the server holding the keys is compromised.

What does a delete marker look like in the listing?

list-object-versions shows it under DeleteMarkers with IsLatest: true; a plain GET then returns 404 Not Found.

Verdict
  • One command turns versioning on, and a lifecycle rule keeps it from eating the quota.
  • For backups that must survive a hacked server, pair it with Object Lock, set on a new PrivateS3 bucket by ticket. See server backup storage.
Sources (7)
  1. put-bucket-versioning docs.aws.amazon.com/cli/latest/reference/s3api/put-bucket-versioning.html — AWS CLI Command Reference (read 17 November 2026)
  2. list-object-versions docs.aws.amazon.com/cli/latest/reference/s3api/list-object-versions.html — AWS CLI Command Reference (read 17 November 2026)
  3. put-bucket-lifecycle-configuration docs.aws.amazon.com/cli/latest/reference/s3api/put-bucket-lifecycle-configuration.html — AWS CLI Command Reference (read 17 November 2026)
  4. How S3 Versioning works docs.aws.amazon.com/AmazonS3/latest/userguide/versioning-workflows.html — Amazon Web Services (read 17 November 2026)
  5. Amazon S3 Storage Providers (versioning commands) — rclone (read 17 November 2026)
  6. Amazon S3 (versions in Cyberduck) — Cyberduck documentation (read 17 November 2026)
  7. S3 Compatible Object Storage Considerations and Limitations — Veeam Help Center (read 17 November 2026)

A versioned bucket for backups: 5 TB for 12 months, $133.87

Versioning and lifecycle rules from any S3 client, paid in crypto.

$5.40/TB-month · no KYC

Get storage