sudo - I accidentally deleted the home directory on my Amazon Linux EC2. My whole site disappeared. What now?

05
2014-04
  • user2423345

    I was using sudo rm -rf to delete some folders, and accidentally deleted the /Users/ec2-user home directory. I had my EC2 and AWS Route 53 running my site. Now, it just disappeared. I have all the files for my website, but don't know how to get it back up and running well. It just says "No Data Received" if I visit my website. Help!

  • Answers
  • David Levesque

    If you have taken an AMI of your instance or an EBS snapshot, you can launch a new instance from it. Otherwise, if you have all your important files somewhere else, you can launch a fresh stock instance and redo the setup you did originally. Then just reassign the Elastic IP of the old instance to the new instance, and terminate the old one.


  • Related Question

    backup - Are whole VM images backed up on Amazon EC2/S3?
  • John

    I've been trying to get my head around Amazon Web Services as a VPS provider. My understanding is a EC2 instance running Windows is basically a Windows VM, very similar to renting a VPS from a more traditional hosting provider.

    I don't want to have complex backups, either to administer or to restore - if my restore involves installing SVN, MySQL, Jira, etc on a new box before I can even try to restore the backup then it's not great to me.

    What I really want is a service which backs up my entire VM... if the PC running the VPS dies then the VM image is installed on a new PC and off we go again.

    With Amazon being all about flexibility and elasticity, I wondered if they have this service? I can't figure it out from reading their docs.


  • Related Answers
  • Tomas Markauskas

    If you use EBS volumes then you don't can create backups via snapshots which is very easy to do (just a single API call or via the aws console). You can also use an EBS-based windows AMI so the whole system would be stored on EBS.