Pregunta

Several months ago, I followed http://aws.amazon.com/articles/1663 and got it all running. Then, my PC crashed and I lost the keypair (http://stackoverflow.com/questions/7949835/accessing-ec2-instance-after-losing-keypair) and could no longer access the instance.

I want to now launch a new instance and mount this MySQL/DB volume which is left over from before and see if I can get to the data on it. How can I go about doing that?

¿Fue útil?

Solución

You outlined the correct approach to this problem already, and the author of the article you referenced, Eric Hammond, has written another one detailing this very process, see Fixing Files on the Root EBS Volume of an EC2 Instance - it boils down to:

  • start another EC2 instance
  • stop the EC2 instance you can't access anymore
  • detach the EBS volume from the stopped instance
  • attach the EBS volume to the running instance
  • SSH into the running instance
  • mount the EBS volume in the running instance
  • perform whatever fixes necessary, i.e. adjust the /var permissions in your case

Please see Eric's instructions for details on how to do this from the command line; obviously you can achieve all steps up to the SSH access via the AWS Management Console as well, removing the need to install the Amazon EC2 API Tools, in case they aren't readily available already.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top