IBM Cloud Object Storage introduces versioning to protect your data against accidental deletion or overwrites.
When versioning is enabled on an IBM Cloud Object Storage bucket, multiple versions of an object are automatically saved so that you can easily recover data from either an unintended user action or an application failure.
You can enable versioning at the bucket level for any storage class. The default state of versioning for a bucket is disabled. Once enabled, all objects in the bucket will have versioning turned-on. Versioning can also be suspended at any time to stop creating new versions of objects in the bucket. Normal capacity charges (pricing) apply for each version of the object.
In a version-enabled bucket, if you overwrite an object, a new version of the object is created as the current version, while the older version of the object is retained and referred to as the non-current version of the object. With versioning, you will have one current version of an object and 0 or more non-current versions. All versions of the object receive a unique version ID. The current marker always points to the latest copy of the object. Reading an object (GET) fetches the latest version of the object pointed to by the current marker. You can also access any noncurrent version by specifying the Version ID in your GET request:
Deleting an object
In a version-enabled bucket, deleting an object simply creates a Delete Marker as the current version of the object. A GET on a deleted object returns a 404 error. No data is permanently deleted, and the changes can be reversed:
Deleting a version
When a specific version of an object is deleted by specifying the Version ID, the deletion is permanent:
The benefit of storing every version of an object comes at the cost of storing more data. You can manage your storage and hence the cost of retaining multiple versions of the object by setting lifecycle rules to archive or expire older versions of the object. You can also suspend versioning on a bucket if you don’t want to accumulate new versions:
Versioning can be accessed on the IBM Cloud Object Storage buckets using the IBM Cloud console, the REST API or using the SDK. For information on how versioning works, see Versioning Docs.