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

Amazon S3 - How to Enable and Suspend Versioning?

Enable or Suspend Versioning on Amazon S3 Bucket Versioning by sending a PUT Request to Amazon S3 server
You can enable an Amazon S3 Bucket's Versioning State to preserve multiple versions of files ( Objects ) stored in that Bucket. After you Enable Versioning on an Amazon S3 Bucket, you can preserve and retrieve overwritten and deleted object(s) of your Bucket . Once you have enabled versioning on a Bucket, the versioning will be applied to every single Object stored in that Bucket. To authenticate the request, you must be the Bucket owner. Also, if versioning is enabled on a Bucket, you cannot convert it back into Unversioned state (which is the default state), however, you can Suspend Versioning on that Bucket to stop collecting versions of Objects in future.
You can Enable or Suspend Versioning on Amazon S3 Bucket in one of the two ways explained below:
  1. Enable Versioning on an Amazon S3 Bucket using REST API (PUT Bucket Versioning) - If you are a programmer and want to write your own program to Enable Bucket Versioning, you can call Amazon S3 REST API from your own code (Amazon SOAP API does not support Versioning).
  2. Enable Versioning on an Amazon S3 Bucket using Bucket Explorer - If you do not want to write your own software program, you can Enable or Suspend Bucket Versioning using Bucket Explorer, with simple mouse clicks.
The below sections describe the steps involved in the above mentioned two options:

a. Enable Versioning on Amazon S3 Bucket using S3 REST API (PUT Bucket versioning)

To set Amazon S3 versioning on the Bucket, you will need to request PUT Bucket versioning. If MFA Delete is enabled in Bucket versioning configuration, owner of the Bucket needs to include x-amz-mfa request header and also include Status and MfaDelete request elements to be able to set the versioning state of the Bucket. You also need to set versioning state with Enabled or Suspended.

Syntax:


PUT /?versioning HTTP/1.1
Host: BucketBame .s3.amazonaws.com
Content-Length: length
Date: date
Authorization: signatureValue
x-amz-mfa: {SerialNumber} {TokenCode}

<VersioningConfiguration xmlns=”http://s3.amazonaws.com/doc/2006-03-01/”>
<Status> VersioningState </Status>
<MfaDelete> MfaDeleteState </MfaDelete>
</VersioningConfiguration>
 

Note the space between {SerialNumber} and {TokenCode} .

b. Enable Versioning on Amazon S3 Bucket using Bucket Explorer

Bucket Explorer now supports Amazon S3 versioning. By enabling S3 versioning, you can preserve and retrieve overwritten and deleted object(s) of your Bucket. You can enable this feature by setting S3 versioning on Bucket.

Steps to Enable S3 Versioning on Amazon S3 Bucket:

  1. Start Bucket Explorer and connect with your Amazon S3 Account.
  2. Select the Bucket on which you want to enable S3 versioning.
  3. Right click on the Bucket and select “Versioning” -> “Set” option .
  4. You can also set versioning by clicking on “Advanced” >> “Versioning” >> “Set”   in Bucket toolbar.
  5. A window entitled “Set Versioning” will open.
  6. You need to check “Versioning” option and click on “Set” button.
  7. It will display "Versioning has been set successfully for bucket :$ Bucket Name $” message on the screen.

Steps to remove S3 versioning from a Bucket:

  1. Select the Bucket on which you have already enabled S3 versioning.
  2. Right click on the Bucket and select “Versioning” -> “Remove” option.
  3. You can also remove versioning by clicking on “Advanced” >> “Versioning” >> “ Remove   button.
  4. A window entitled Remove Versioning” will open.
  5. You need to uncheck the options that you want to disable and click on “Remove” button.
  6. It will display “ Are you sure you want to remove versioning?” message on the screen.
  7. Click on “Yes” to proceed.
  8. It will display “Versioning has been removed for bucket : $Bucket Name$” on the message.