All Collections
Amazon Web Services
Restoring Data From an EBS Snapshot
Restoring Data From an EBS Snapshot

How to get your data from an EBS snapshot

Matt Houser avatar
Written by Matt Houser
Updated over a week ago

To retrieve data from an EBS snapshot, you must create an EBS volume from the snapshot. AWS does not allow you to restore an EBS snapshot "onto" an existing EBS volume.
​ 
There are many ways to "restore" from an EBS snapshot.
​ 
Option 1: Restore the EBS snapshot to an EBS volume.
​ 
The most basic way to restore data from an EBS snapshot is to create a new EBS volume from the EBS snapshot. When you do this, the new EBS volume will be a copy of the EBS volume that created the EBS snapshot, from the time the EBS snapshot was first created.
​ 
AWS documentation includes instructions to restore an EBS volume from an EBS snapshot.
​ 
Once you have your EBS volume, you attach the EBS volume to an existing EC2 instance, mount the volume inside the EC2 instance, then read/copy the data as necessary.
​ 
AWS documentation includes instructions to attach an EBS volume to an EC2 instance.
​ 
Option 2: Restore the root volume of an EC2 instance from an EBS snapshot.
​ 
As previously mentioned, it's not possible to restore an EBS snapshot "onto" an existing EBS volume.
​ 
Instead, a new EBS volume is created like in option #1. After the new EBS volume is created from the EBS snapshot, the old root volume of the EC2 instance is replaced with the new EBS volume.
​ 
To replace the root volume of the EC2 instance:

  1. Stop your EC2 instance.

  2. Detach the old root volume from your EC2 instance. Make note of the device name that the root volume is attached as. For example, "/dev/xvda".

  3. Attach the new root volume to your EC2 instance using the same device name that was used for the old root volume.

  4. Start your EC2 instance.

Option 3: Create an AMI from the EBS snapshot, then launch an EC2 instance from the AMI.
​ 
If your original EC2 instance was a Linux instance, and if your EBS snapshot is from the root volume of that EC2 instance, then you can create an AMI image from your EBS snapshot.
​ 
AWS documentation includes instructions to create an AMI image from an EBS snapshot.
​ 
Once you have your AMI image, you can launch a fresh EC2 instance from your new AMI image.

Did this answer your question?