How are Amazon EBS snapshot’s sizes calculated

amazon ec2amazon-ebs

First, how can I retrieve the space consumed by my EBS snapshots?

Second, according to the documentation, Amazon EBS snapshot only backs up the blocks of an EBS volume that have been modified since the last snapshot creation. Suppose I have a 10GB EBS volume. I created the 1st snapshot for it. Since there is no "last" snapshot, I assume the first snapshot's size is 10GB. OK. And then I modified 1GB of data and created a 2nd snapshot. The 2nd snapshot's size should be around 1GB, right? However what if I deleted the 1st snapshot at this point? Is the 2nd snapshot still 1GB? If yes, can I still restore the 10GB EBS volume from the 2nd snapshot? Or does the 2nd snapshot automagically become 10GB?

Best Answer

This may answer Q2 (from http://aws.amazon.com/ebs/):

Even though the snapshots are saved incrementally, when you delete a snapshot, only the data not needed for any other snapshot is removed. So regardless of which prior snapshots have been deleted, all active snapshots will contain all the information needed to restore the volume

In your example after deleting the first snapshot you would not pay anymore for the 1GB in the first overwritten by the second snapshot, and you won't be able to restore the state of the first snapshot.

But it's still quite opaque about how much a set of snapshots costs in terms of S3 usage.

Related Topic