Ec2 Instance terminated atomically and volume deleted too - how to get files?

0

Hi

I have my website attached to that Instance and I am unable to get into those, what should I do? Ec2 Instance terminated automatically and volume is deleted too.

Matt W
asked 10 months ago375 views
3 Answers
0

What about the storage? I have a main website on that instance and I dont have backup offline

Matt W
answered 10 months ago
  • Matt, as noted, if you didn't change the defaults, the root volume was also deleted. The only other option I see is if your website was on a different volume attached to the instance, not the root volume, then by default that is preserved and you can attach it to a new instance to get your data back.

0

Hi,

There is no way of getting back a terminated instance. By default the root EBS volume get's automatically deleted as soon as an instance is terminated. If you have attached an additional EBS volume this might be still available and can be connected to a new/different instance to access the data on this EBS volume. Please also see: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html

You can check in Cloudtrail who and when send the terminate call: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events-console.html For the future you can always protect your instance from getting terminating by mistake via the "termination protection" (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using_ChangingDisableAPITermination)

profile pictureAWS
EXPERT
answered 10 months ago
0

Hi Matt.

If the EC2 instance has been terminated, then it has been permanently deleted. Also, by default, the instance's EBS root volume is also deleted. Only if you changed the configuration after the instance was created to not delete the volume then it would have been preserved.

Conclusion, if the instance is terminated and use the default configuration for the root volume, then both the instance and the volume have been deleted and there is no way to recover the information.

Possibilities based on configuration changes (not defaults). If you didn't do any of these then I'm afraid your data is unrecoverable.

  • You changed the configuration of the root volume so it is preserved after termination.
  • You took a snapshot of the instance. From the snapshot you can re-create the volume and launch a new instance.

I hope this helps.

profile pictureAWS
EXPERT
answered 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions