Bucket Versioning

Bucket versioning protects security of objects in the buckets by preventing users from mistakenly deleting or overwriting the objects.

The following figure illustrates the bucket versioning function. Although object photo.gif has been overwritten for many times, the object that has been overwritten exists as an object of a specific version and can be downloaded.

Figure 1 An object in a bucket for which versioning is enabled

After the bucket versioning state is set to Enabled:

  1. The system creates a unique version ID for each uploaded object. Namesake objects are not overwritten and are distinguished by version IDs.
  2. You can download objects by specifying version IDs. By default, the latest object is downloaded if the version ID is not specified.
  3. A deletion marker is added to the deleted object, and the object still remains. When you delete an object by specifying its version ID, the object can be actually deleted.
  4. When you list objects in a bucket, the latest objects are listed by default. You can also specify and list objects of all version IDs.

After the bucket versioning state is set to Suspended:

  1. Existing objects with version IDs are not affected.
  2. The system creates version ID null to an uploaded object and the object will be overwritten after a namesake one is uploaded.
  3. You can download objects by specifying version IDs. By default, the latest object is downloaded if the version ID is not specified.
  4. You can delete an object by specifying its version ID. If you do not specify a version ID, the latest object will be deleted and a deletion marker is generated indicating that the version ID is null:

Bucket versioning is disabled by default.

Registration