How to Recover data from Lost EC2 Instance on AWS

 

Have you ever thought what to do in-case your EC2 instance is lost.  Many people believe thats not possible.
I have been using AWS services & EC2 Instances for my websites for more than a years now.

Reasons of Loosing EC2 Instances

Two issues that I have faced with EC2 Instance where I need to restore the data or recover the data due to issues in EC2 Instance.

1. Suddenly my running instance got failed for no reason. When I checked its health status check both were getting failed. In that case you can't get same instance running again. Neither AWS support can make that instance run again as happenned the same with me.

2. I have setup auto scaling group with my running instance.  When you create auto scaling group there are few options that you need to be alerted.  Max Range, Min Range & Desired Instance.  If you set min range 0(zero) or you Desired 0.  In-case any of them are zero there are high chances to loose the instance.

Recovery of data on lost ec2 Instance

What to do to recover the data when Instance is terminated, corrupted, lost, etc?

In AWS every instance creates a volume, when an instance is lost, corrupted etc.  Their volume exist there.  Is is like your system is not in running stage But Hard Disk is still there & intact.

Steps to Recover Lost EC2 Instance Data

To get latest data of your last running instance, You can create a new instance & Attach the new Volume with this instance.

Procedure for attaching volume & getting latest data.

  1. Create a new instance
  2. Change its State to Stop
  3. Dettach the volume that got associate with it at the time of creation.
  4. Attach the volume of last instance, If you have many then you need to guess on which date last volume was created.
  5. When attacing the voluem make it root, otherwise Instance will not start.

Hope this will people Looking to recover Data from from Lost EC2 Instance

Comments

No Comments Posted Yet (Be The First To Comment On This)

Please share your views with us
Check if you want to display your email-id.
Enter the sum of digits
3+2 =