Restore EC2 Instance from Snapshot
To restore EC2 Instances from the snapshot(s) in the same or different AWS region follow these steps:
- Create a new EC2 Instances with parameters similar to the instance from which the snapshot(s) was taken. If possible, the best practice would be to take an AMI of the existing EC2 and create a new instance based on that AMI. The new instance can be created in any AWS region.
- Identify the snapshot that was taken from the root (C: drive) EBS volume
- To identify root snapshot go to the AWS Management Console
- Under EC2 section, click “Instances”
- Select the source instance
- In the Description section, click “Root device type”
- Copy or Note EBS ID
- Go to Snapshots section
- In the Search field type or paste the EBS ID
- On the list you should see the snapshots created from the root volume
- If the new instance will be launched in different AWS region, copy the root snapshot to destination region, otherwise skip this step.
- To copy a snapshot to a different region go to the AWS Management Console
- Under EC2 section go to Snapshots and select the “root snapshot”
- From the menu, select “Copy”
- Choose the destination region and click “Copy”
- Stop the new EC2 Instance
- Detach the root volume from the Instance
- To identify root volume follow steps [a-d] from #2
- Go to volumes
- Type the volume ID in “Search Volumes” field
- Check the root volume on the list
- From “Action” select “Force Detach Volume”
- Create a new volume based on the snapshot identified in #2
- Go to snapshots
- Find the new snapshot
- From “Actions” select “Create Volume”
- Select appropriate type of Volume (Standard or IOPS)
- You can enter the bigger size if needed
- Availability zone must be the same as the one where a new EC2 instance was launched in
- Click “Create”
- Attach the new volume
- Go to volumes
- Select the volume that was created in #6
- From “Actions” select “Attach volume”
- In Instance field select the instance created in #1
- In Device field type /dev/sda1
- Click “Attach”
- Start Instance
Here is much shorter version to achieve the same task using Elastic Cloud Gate console:
- Under the EC2 section, expend volumes under the instance from which the root snapshot was taken from. The root volume will be shown in bold.
- From the menu select snapshots.
- In the new window from the menu select “Create EC2 Instance”.
- Set the configuration of the new EC2 Instance as well as what AMI option should be used as the base for the new EC2 Instance.
- Click “Launch”.
No comments:
Post a Comment