Moving EBS snapshots to Glacier

28,615

Solution 1

Amazon has just released (Nov 2021) a new feature which is relevant to this issue: Amazon EBS Snapshots Archive

https://aws.amazon.com/blogs/aws/new-amazon-ebs-snapshots-archive/

EBS Snapshots Archive provides a low-cost storage tier to archive full, point-in-time copies of EBS Snapshots that you must retain for 90 days or more for regulatory and compliance reasons, or for future project releases. Now, you can easily archive and manage EBS Snapshots, thereby eliminating the need for custom scripts and third-party tools to manage these snapshots. This lets you move your rarely accessed snapshots to EBS Snapshots Archive to achieve up to 75% lower storage costs, and avoid licensing costs for third-party tools. Furthermore, you can retrieve an archived snapshot within 24-72 hours, and, once restored, use the snapshot to recover an EBS volume.

Solution 2

While Amazon EBS indeed provides the ability to create point-in-time snapshots of volumes, which are persisted to Amazon S3, this operation is outside of your control and entirely handled by EC2, see the respective FAQ Will I be able to access my snapshots using the regular Amazon S3 APIs?:

No, snapshots are only available through the Amazon EC2 APIs.

Consequently you won't be able to do move these non accessible snapshots from the backing Amazon S3 storage to Amazon Glacier either and this would only be possible if AWS provides the functionality directly in the future, e.g. in a similar way to the recently enabled Archiving [of] Amazon S3 Data to Amazon Glacier by means of Object Lifecycle Management.

Solution 3

EBS snapshots cannot be moved to Glacier nor does it make much sense to store them there. As EBS snapshots are incremental, each snapshot typically points to data stored in many previous snapshots. Because retrieval of objects from Glacier takes an extremely long time, even of it was possible to move EBS snapshots to Glacier, restoring data contained in snapshots from Glacier would be a practically unusable scenario. Glacier archiving works better with files: copy or backup the necessary files to Glaciers, so you may retrieve them at a later time.

Solution 4

Amazon doesn't have a feature for doing this. However, if you don't mind losing the space-saving advantage that the snapshots' incremental nature gives you, you could turn your snapshot into a temporary EBS volume, tar up the contents, and upload that tar to S3, where it can be automatically migrated to Glacier using S3 bucket lifecycle rules.

I've developed an open-source tool which automates this process for you, called snap-to-s3:

https://github.com/thenickdude/snap-to-s3

You can opt to use dd instead of tar to preserve every byte of the volume instead, if you like.

Share:
28,615
Max
Author by

Max

Updated on September 18, 2022

Comments

  • Max
    Max over 1 year

    I have hundreds of large EBS snapshots I need to move to Glacier.

    What's the best way to go about doing this?

  • user
    user over 10 years
    "You run the risk of not being able to get to them quickly if you suddenly find you need them" That comes as a part of the package with Glacier, so would seem to be something the OP has already considered. When transitioning from S3 to Glacier you get the ~90% reduction in price, at the cost of loss of immediate access (Amazon says access times for data stored in Glacier can be up to five hours, IIRC).
  • Ramhound
    Ramhound over 7 years
    Answers should not be used to submit comments. This answer does not seem to answer the author's question.
  • Ramhound
    Ramhound over 7 years
    The first sentence still read like a comment, with the quoted response, its closer to an actual answer though (IMO)