Explore Courses Blog Tutorials Interview Questions
0 votes
in AWS by (19.1k points)

I accidentally formatted my system and the access keys to the ec2 volume were also deleted. So I stopped the instance and detached the ebs volume. 

However, I am not able to attach it to another ec2 instance as root(/dev/sda1). Can anyone please guide me through it? All my data and server files are there in the volume.

I mounted the first ebs volume and on the 2nd instance and browsed the files in there. They are all intact. If it cannot be mounted on as root volume, I need a way to get all the mysql data from the volume as there are a number of WordPress websites hosted on it. I can access the WordPress files but I don't know how to get the database from the instance.

1 Answer

0 votes
by (44.4k points)

Do this:

  • Stop the instance
  • Detach the current root EBS
  • Attach the new EBS volume under /dev/xvda for Windows and /dev/sda1 for Linux
  • Start your instance

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer

Browse Categories