1

This documentation describes "Restoring an Amazon EBS Volume from a Snapshot".

Having done that this documentation explains "Making an Amazon EBS Volume Available for Use on Linux"

What I'd now like to know is how to make the restored snapshot the root volume so that when the next reboot occurs the reboot is based on the contents of the restored snapshot.

Can someone explain please ?

  • 1
    Look at what the device name is of the currently attached root volume, then shutdown and detach it and attach the restored EBS volume with the same device name. That’s it. Boot the instance and go. – Appleoddity Sep 12 '18 at 3:52
  • @glaucon did you get your question answered? If yes please accept one of the answers to reward the responders for the time they spent answering you. Thanks. – MLu Sep 20 '18 at 3:29
1

It's quite simple, you have to detach the existing root volume and attach the one restored from snapshot.

  1. Stop the instance (don't terminate it).

  2. In the EC2 details look for the Root volume name, it will probably be either /dev/xvda or /dev/sda1. Note it down. Then click on the volume id in the pop-up box when you hover over the Root volume name, e.g. vol-1234abcd1234abcd

  3. In the Volumes screen find the current root volume vol-1234abcd1234abcd and from the menu select Detach volume.

  4. In the Snapshots screen select the snapshot you want to restore and in the Actions menu click Create volume. It will give you the volume id (e.g. vol-9876efgh9876efgh). Wait for it to complete.

  5. Find your restored snapshot volume in the Volumes screen (vol-9876efgh9876efgh) and in Actions click Attach volume.

  6. In the dialog select the instance from the menu.

  7. The Root volume won't be in the menu. Simply write what you noted down in step 1 above, e.g. /dev/xvda or /dev/sda1.

  8. Start the instance.

Done :)

| improve this answer | |
  • This is excellent , thank you very much and I'm sorry it's taken so long for me to respond. – glaucon Sep 24 '18 at 5:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.