This is the second part of the EC2 storage series. (Click here for part I.) This part will discuss the EBS snapshots.

These will be the topics of this part:

  • * Introductory notions about EBS snapshots
  • * Example showing the available operations related to EBS snapshots

An EBS snapshot is a copy of an EBS volume capture in a point of time that is stored in Amazon S3. We will discuss Amazon S3 in a future part of this series.

Snapshots are incremental backups of the volumes. This means that whenever you take a snapshot, only the blocks/data that was changed since the last snapshot are saved. If you delete a snapshot, then you delete only the data is related to that snapshot.

It’s possible that when you create a new volume, the volume would be based on a snapshot. In this case, the new volume will be identical to the volume from which the snapshot was taken.

When you create a volume from a snapshot from Amazon S3, this new volume is loading in the background. This allows the user to start using the new volume as soon as possible. If the user is accessing data that hasn’t loaded yet, then that specific data is loaded first and only then the rest of the data is being loaded.

You can share your snapshots with others. They can either be specific users or you can make the snapshot available to the entire AWS community. Regardless who is using the snapshot, they cannot modify the snapshot.

The snapshots are contained in the region where they were created. This means that once the snapshot of a volume was created, then the new volumes based on this snapshot must be created only in the same region. You can (WORD missing?) the possibility to copy a snapshot from one region to another. This will allow you to create new volumes in other regions.

To create a snapshot, you must first unmount the volume which is snapshot-ed. If you are taking a snapshot of a volume that is a root device for an instance, you must first stop the instance.

On EC2 dashboard, from the ‘ELASTIC BLOCK STORE’ choose ‘Snapshots’ and then click on ‘Create Snapshots’. A pop-up window will ask you for a few details regarding the new volume:

Once you click ‘Create’, the snapshot will be created as a full copy of the volume that you specified in wizard:

As I was saying, you can only create volumes from snapshots in the same region. Considering that the snapshots are in the US East region, then I can create volumes based on these snapshots only in the US East region. How can I create volumes in another region?

I can copy the snapshot in another region, for instance, EU region and from there I can create the volume that I need.

This is how you can copy the snapshot in another region.

From the list of snapshots, select the snapshot that you would like to copy and from ‘Actions’ choose ‘Copy’:

Then follow up the wizard by selecting the destination region and the description of the snapshot. Best practice is to give a descriptive name as much as possible:

Once you clicked on ‘Copy’ the snapshot starts to be copied and you can switch to that region to see the progress:

In the first part of the series, I showed you how you can create a brand new volume from scratch. There is another option to create a volume and that is from a snapshot and this is how it’s done.

On EC2 dashboard, from the ‘ELASTIC BLOCK STORE’ choose ‘Volumes’ and then click on ‘Create Volume’. A pop-up window will ask you for a few details regarding the new volume. Note the size of 15GB. Click on ‘Snapshot ID’ and then a list with available snapshots will be shown. In this case, I used the snapshot that was created based on a volume previously attached to a Windows instance:

Once you click ‘Create’, you will see the new volume in the volumes list:

I attached this new volume to the Windows instance like I showed in the first part of the series. Note the size of 15GB:

I assigned a new drive for the new disk and checked if there is the text file that I created previously. And it’s there:

In case you don’t need the snapshot anymore, you can delete it like this: select the snapshot from ‘Snapshots’ menu and then from ‘Actions’ choose ‘Delete’:

As I was saying you can share your snapshots with other people. Then they create their own volumes based on your snapshots. This is how you can share your snapshots with everybody else.

Select the snapshot from ‘Snapshots’ menu and then from ‘Actions’ choose Modify Snapshot Permissions’:

From the pop-up window, check the ‘Public’ option and click ‘Save’:

And we reached the end of the article which discussed EBS snapshots. I hope you enjoyed this and it was informative for you.

If you read the article up to this point, then you should be familiar with:

  • * What a snapshot is
  • * How you can create, copy and delete one
  • * How you can create a volume from a snapshot
  • * How to share your snapshots with others

The next part of the series will discuss Amazon S3 service, another great service from Amazon AWS.

Reference

  1. Amazon Elastic Block Store (Amazon EBS) (link to http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AmazonEBS.html)