Skip to main content

Object Versioning

Versioning allows you to store and, if necessary, restore previous object versions — for example, if an object was accidentally deleted.

Versioning can be enabled in an existing bucket or when creating a bucket.

Object versions

An object is considered a version of another if it has the same name and was uploaded again.

The current version is the object that was uploaded last, or an object that was restored from a previous version. Other versions of the object are previous versions. There can only be one current version; the number of previous versions is unlimited.

If versioning is enabled, when uploading a new version of an object, the previous version of the object is not overwritten, but added to the list of object versions marked with and having the same object name. Each version is assigned a unique identifier.

A previous version of an object can be restored — made current.

Versions can be managed as normal objects (except for versions with the Deleted tag). If a bucket policy is created in the bucket, it must allow the corresponding actions with versions.

View the list of object versions

  1. In the control panel, on the top menu, click Products and select S3.
  2. Go to the Buckets section.
  3. Open the bucket page → Objects tab.
  4. Enable the Versions toggle.
  5. Below the object line, view its versions — they are marked with and have identical names.

Version ID

When versioning is enabled, each version is assigned a version ID (version_id) — a unique identifier. It can be used to manage any version of an object. You can view the version identifier in the control panel.

If you suspend versioning, new objects will not be assigned a version ID — the value will be null. Old object versions will retain their version ID.

View the version ID

  1. In the control panel, on the top menu, click Products and select S3.
  2. Go to the Buckets section.
  3. Open the bucket page → Objects tab.
  4. Enable the Versions toggle.
  5. In the version line, view the identifier in the Version ID column.

Enable versioning

  1. In the control panel, on the top menu, click Products and select S3.
  2. Go to the Buckets section.
  3. Open the bucket page → Configuration tab.
  4. In the Data Protection block, in the Versioning line, click Edit.
  5. Turn on the toggle.
  6. Click Save.

Suspend versioning

After suspending versioning, the existing object versions will not be deleted.

When uploading a new version, it will overwrite the current version and will not be saved in the version list.

If Object Lock is enabled, you cannot suspend versioning.

  1. In the control panel, on the top menu, click Products and select S3.
  2. Go to the Buckets section.
  3. Open the bucket page → Configuration tab.
  4. In the Data Protection block, in the Versioning line, click Edit.
  5. Turn off the toggle.
  6. Click Save.

Billing

Each version takes up storage space, and its storage volume is billed. Deleted versions and versions that have been moved to another bucket do not take up space, but they appear in the version list with the Deleted tag.