Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Archiving Your S3 Content

DZone's Guide to

Archiving Your S3 Content

· Cloud Zone
Free Resource

MongoDB Atlas is a database as a service that makes it easy to deploy, manage, and scale MongoDB. So you can focus on innovation, not operations. Brought to you in partnership with MongoDB.

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).

MongoDB Atlas is the best way to run MongoDB on AWS — highly secure by default, highly available, and fully elastic. Get started free. Brought to you in partnership with MongoDB.

Topics:

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.

SEE AN EXAMPLE
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.
Subscribe

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

{{ parent.tldr }}

{{ parent.urlSource.name }}