< Previous | Contents | Next >

Versioning

Versioning is an optional bucket feature that enables the creation and management of multiple versions of an object. With versioning enabled, when you store an object with the same name as an existing object, a new version of the object is created. If versioning is not enabled, you cannot store an object that has the same name as an existing object.


HCP does not create new versions of objects that are under retention or on hold. An attempt to store a new version of such an object results in an error.


You can use the HS3 API to enable, disable, and view the status of versioning for buckets you own. Tenant administrators can also take these actions on buckets you own. Whether versioning is initially enabled when you create a bucket is determined by a tenant-level configuration setting.


image

image

Note: Tenants can be configured not to allow versioning at all. If the tenant is configured this way, you cannot enable versioning for your buckets.

image


You cannot enable versioning for a bucket while the WebDAV, CIFS, NFS, or SMTP protocol or appendable objects are enabled for that bucket. You can disable versioning for a bucket at any time.


Disabling versioning does not cause old versions of objects to be deleted. However, you cannot store new versions while versioning is disabled. A request to retrieve an old version of an object while versioning is disabled returns the current version.


Each version of an object is an object in its own right. It has system metadata and can have custom metadata and an ACL. However, you can change metadata only on the current version of an object. Changing metadata, other than the owner or ACL, has no effect on old versions of the object. Changes to the object owner or ACL apply to all versions of the object.


All objects, including those created while versioning is not enabled, have version IDs. Version IDs are integers. Each time a new version of an existing object is created, that new version is assigned an ID that is greater than the ID of the previous version of the object. The IDs for multiple versions of an object are not necessarily consecutive numbers.


Version IDs are unique for the versions of a given object but are not necessarily unique across the versions of all objects.


Chapter 2: Bucket and object properties 35

Allocated space


HCP also assigns version IDs to folders. However, folders cannot have multiple versions.


When you store an object while versioning is enabled, HCP returns the version ID of the object in the x-amz-version-id response header. When you store an object while versioning is disabled, the response headers do not include x-amz-version-id.


When you delete an object while versioning is enabled, HCP:


Retains a copy of the deleted object as an old version.


Creates a special version of the object, called a deleted version, as the current version. This version serves as an indicator that the object has been deleted. A deleted version of an object has a version ID but does not have any data or metadata. The version ID of the deleted version is different from the version ID of the object you deleted.


If you delete an object with multiple versions while versioning is disabled, HCP, changes the current version of the object to a deleted version and does not change the version ID.


You can delete only the current version of an object (provided that it’s not under retention or on hold). You cannot delete an old version or a deleted version.


If versioning is enabled for a namespace, pruning may also be enabled. Pruning is the automatic deletion of old versions of objects after a specific length of time since their creation. HCP does not prune old versions of objects that are on hold.


Whether pruning is initially enabled when you create a bucket is determined by a tenant-level configuration setting. You cannot use HS3 to change the pruning setting for a bucket. However, tenant administrators can use other HCP interfaces to do this.