This week I will explain Amazon Web Services Storage Gateway Snapshots operations. Snapshots are used to access or restore our data, can be attached and used both in our on-premises or in EC2 as EBS. We can create snapshots as manually or automatically and snapshots are restored to either a storage gateway or to an EBS volume. Today I will demonstrate to take the snapshot of my volume ( I’ve configured gateway-cached volume before , so my volume is stored in S3 ) and restore it to an AWS EBS volume, and finally attach it to an EC2 instance. So let’s begin.
First of all let’s take a manual snapshot. In Storage gateway console, I click my gateway and select my volume. Then I click “Create Snapshot”.
We can monitor the snapshot status both in Storage gateway console and EC2 console under EBS->Snapshots. Here I want to mention that we can also use the snapshots of our EBS volumes and restore them as a volume for our storage gateway. Doing this, we can mount them in our on-premises and access the data resided on AWS.
Next , I will add a snapshot schedule. By default, if you use gateway-stored volume, AWS creates a snapshot once a day, for gateway-cached, it is not scheduled. Again in console, I go to “Snapshot Schedules” tab , and click “Add/Modify Snapshot Schedule”. Then I configure it to run every 24 Hours.
We can delete the snapshots again using Storage gateway and EC2 console or using SDK.
Now I will use this snapshot and restore it to an EBS volume. This is the same operation as we do for EBS snapshots. Again in EC2 console on snapshots tab, I select my snapshot and select “Create Volume” from actions. You can find it by filtering with your volume Id. If you take the snapshot manually for one-time, the description will be “AWSConsole-Snapshot”. If it was taken as scheduled, the description will be as “gatewayID:volumeID:Schedule” pattern.
Then I select my options like volume type,size,AZ and then create.
The volume is ready and I will attach it to my instance.
Finally I mount it to my EC2 instance.
As you see this subject is easy to configure and manage and I hope you find it helpful . You can use storage gateway in your on-premises both as a backup solution, migration tool or for disaster recovery purposes. If you have any question or comment, please feel free to write and don’t forget to share please.