Over a million developers have joined DZone.

Archiving Your S3 Content

· Cloud Zone

Download the Essential Cloud Buyer’s Guide to learn important factors to consider before selecting a provider as well as buying criteria to help you make the best decision for your infrastructure needs, brought to you in partnership with Internap.

In a previous post I showed how to setup a Glacier Vault and put data in it by using a CLI. Another way to make use of the cheaper storage service is to move your data from a S3 bucket into a Glacier vault. You can do this by making use of the Object Lifecycle Management which make it possible to move data from your S3 bucket to a Glacier storage class by simply applying a rule like if data in a bucket is more than 3 months old move it.

Please note that although the object is stored in Glacier you cannot access the object from the Glacier console or API. You can only access them via the S3 service to restore a copy of it for a certain time.

Go to the S3 services and select the bucket you want to archive:
Screen Shot 2013-05-15 at 21.56.11
Make sure you select the root of the bucket. If so, then the option ‘Lifecycle’ is available as property. Click ‘Add rule’ to add an archiving rule:
Screen Shot 2013-05-15 at 21.56.40
In the ‘Rule’ window you can define which objects in the bucket should be moved to the Glacier and when:
Screen Shot 2013-05-15 at 21.57.25
After saving the rule just wait and after some time you can see the Storage Classof your objects in the bucket that matches the defined rule will be moved from the ‘Standard’ Storage class to the ‘Glacier’ storage class:
Screen Shot 2013-05-26 at 16.42.37
Now these objects are stored in the Glacier storage (and thus no longer accessible in real time).

The Cloud Zone is brought to you in partnership with Internap. Read Bare-Metal Cloud 101 to learn about bare-metal cloud and how it has emerged as a way to complement virtualized services.


Published at DZone with permission of Pascal Alma, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}