Question

How to replace a Amazon EC2 instance with a new instance without removing tomcat7, mysql and other setting done on the instance?

Was it helpful?

Solution

Simple:

  1. Stop the instance.
  2. Detach the volume(s) - if you just have one volume (the boot volume) detach that.
  3. Take a snapshot of the volume(s) for safekeeping (not strictly necessary in this case, but no-one ever got fired for taking backups of critical systems).
  4. Terminate the instance.
  5. Spin-up a new instance of the desired type (must be the same platform, i.e. x86 or x64, as the original).
  6. Wait until it's running, then stop it.
  7. Detach its' volume and delete it.
  8. Attach your original volumes to it (the boot volume must be /dev/sda1).
  9. Restart the new instance and re-assign Elastic IP if appropriate.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top