Object versioning allows you to keep multiple versions of the same object in a bucket. When versioning is enabled, each update to an object creates a new version instead of replacing the existing one.
Versioning helps protect data from accidental deletion, overwriting, or application errors, and allows you to restore previous versions of objects.
When versioning is enabled for a bucket:
- Each object version receives a unique version ID
- Uploading an object with the same key creates a new version
- Previous versions remain stored in the bucket
If multiple write operations for the same object occur simultaneously, Object Storage stores all of resulting object versions.
By default, versioning is disabled on buckets. Once you enable versioning, you cannot fully disable it and can only suspend it.
For lower latency and higher throughput in high-load scenarios, we recommend using buckets with versioning disabled.
If your bucket has expiration lifecycle rules that permanently delete objects and you want to maintain the same behavior after enabling versioning, configure expiration for non-current object versions. Non-current version expiration rules manage the deletion of non-current object versions in a versioning-enabled bucket. For more information, see Configure expiration lifecycle rules.
How to enable bucket versioning
Web console
Nebius AI Cloud CLI
AWS CLI
- In the web console, go to
Storage → Object Storage.
- Open the page of the required bucket.
- Go to the Settings tab.
- In the Versioning field, select Enabled.
- Click Save changes.
- Get the bucket ID:
export NB_BUCKET_ID=$(nebius storage bucket get-by-name \
--name <bucket_name> --format jsonpath='{.metadata.id}')
- Enable versioning for the bucket:
nebius storage bucket update --id $NB_BUCKET_ID --versioning-policy enabled
Run the following command:aws s3api put-bucket-versioning \
--bucket <bucket_name> \
--versioning-configuration Status=Enabled \
--endpoint-url https://storage.<region>.nebius.cloud
After versioning is enabled, all subsequent object uploads and modifications create new versions.
After you enable versioning for an existing bucket for the first time, it may take up to 15 minutes to come into effect. We recommend waiting 15 minutes before performing any write operations (PUT or DELETE) to avoid issues with object visibility and version tracking. If you enable or suspend versioning when creating a bucket, it is available immediately with no waiting period.
How to suspend bucket versioning
If needed, you can suspend versioning for a bucket:
Web console
Nebius AI Cloud CLI
AWS CLI
- In the web console, go to
Storage → Object Storage.
- Open the page of the required bucket.
- Go to the Settings tab.
- In the Versioning field, enable the Suspend option.
- Click Save changes.
- Get the bucket ID:
export NB_BUCKET_ID=$(nebius storage bucket get-by-name \
--name <bucket_name> --format jsonpath='{.metadata.id}')
- Suspend versioning for the bucket:
nebius storage bucket update --id $NB_BUCKET_ID --versioning-policy suspended
Run the following command:aws s3api put-bucket-versioning \
--bucket <bucket_name> \
--versioning-configuration Status=Suspended \
--endpoint-url https://storage.<region>.nebius.cloud