download free 30 days trial version buy bucket explorer
Documentation  Download  Purchase  Support  FAQs   Forum   ScreenShots & Demos

Amazon S3 - Adding Objects to Versioning-Enabled Buckets

Preserve version of overwritten files using Amazon S3 Versioning (PUT Object versioning)

You can Enable S3 Versioning on Amazon S3 Bucket to preserve the versions of overwritten files. Once you enable S3 Versioning, everytime you add an S3 Object to that Bucket, S3 assigns a unique Version ID to the Object. To authenticate the request, you must have WRITE permission on the Bucket and add an object into it.

It is important to note, however, that you cannot  set Lifecycle Configuration on an S3 Versioning Enabled Amazon S3 Bucket .

Upload an S3 Object to a Version Enabled Amazon S3 Bucket, Preserve Overwritten and Deleted Files

With object versioning, you can keep multiple versions of an object. Each object has a version ID whether you have enabled versioning on the Bucket or not. If you do not have versioning enabled on the Bucket, the value of the version ID is null. A unique version ID is assigned to an Object if you have enabled versioning on the Bucket.

See the example below, Amazon S3 returns the version ID in the response using x-amz-version-id response header.


PUT / ObjectName HTTP/1.1
Host: BucketName
Date: date
Authorization: signatureValue

Sample Request:

HTTP/1.1 100 Continue
HTTP/1.1 200 OK
x-amz-id-2: LriYPLdmOdAiIfgSm/F1YsViT1LW94/xUQxMsF7xiEb1a0wiIOIxl+zbwZ163pt7
x-amz-request-id: 0A49CE4060975EAC
x-amz-version-id: 43jfkodU8493jnFJD9fjj3HHNVfdsQUIFDNsidf038jfdsjGFDSIRp
Date: Wed, 12 Oct 2009 17:50:00 GMT
ETag: "fbacf535f27731c9771645a39863328"
Content-Length: 0
Connection: close
Server: AmazonS3

Preserve the versions of overwritten files with Bucket Versioning using Bucket Explorer

Amazon S3 versioning allows preserving the versions of overwritten files to save older data.

When Amazon S3 Versioning is enabled on your Bucket:

If Amazon S3 Versioning is enabled on your bucket, then on overwriting same object, Amazon S3 creates a version for that object. You can see this version in version listing of the Objects.

If Amazon S3 Versioning is Not enabled on your Bucket:

If Amazon S3 Versioning is not enabled on your Bucket, Bucket Explorer preserve the overwritten and deleted files. Using this feature, you can retrieve older version of overwritten file(s) in the  same structure [1] as it was stored in your Bucket . Version folder is stored in two default System Buckets named as us.bucketexplorer.SHA1 ( Canonical Id [3] ) and eu.bucketexplorer.SHA1 (Canonical Id). This feature is cost effective because empty buckets do not cost money.

If you delete versions from the System Buckets, they will be deleted permanently from the S3 server and you don’t need to use another third party tool for this.

Versioning of Overwritten Amazon S3 files (Note: This is possible only when Amazon versioning is ‘Disabled’, Bucket Explorer will handle its own versioning. )

Whenever you upload , copy , or move existing files on S3, older versions of those files are moved automatically in versions folder of   relevant system bucket [2] . Data goes in the versions only when a file with the same name but with different content is uploaded.

Versioning feature preserves versions of Amazon S3 files when you overwrite files of the same name. You can download , copy, move, and delete data from the versions folder using Bucket Explorer.

  1. ˆ  Same structure: : In version folder of system Bucket, Bucket Explorer creates a folder named as Bucket name from where you deleted the object. In this folder, there will be the same folder structure as in Bucket and object name gets appended with date and time.
  2. ˆ  Relevant system bucket: There are two system buckets in Bucket Explorer for US and Europe. Version of US Buckets are stored in us.bucketexplorer.SHA1 (Canonical Id) and version of Europe is stored in ue.bucketexplorer.SHA1 (Canonical Id).
  3. ˆ  Canonical Id: The canonical user Id is specific to S3 and is a 64 character long hex string.