1

Basically, we had a server issue and wanted to backup the instance via image creation.

The root EBS backed up pretty quick however, the larger external attached image was taking a while (still going ~40%). Since the primary one was done, we thought it would be ok to reboot the ec2 instance so we clicked reboot and confired - however, nothing happend.

We then tried to do it again ~5 minutes later but again nothing happened.

Suddenly the server started working again (accepting connections etc.) so really don't want the server to be rebooted.

So I guess the question is:

After the snapshot is completed will the servers restart?

2

After the snapshot is completed will the servers restart?

No, they will not.

The reboot starts when you begin the AMI creation process -- immediately before the snapshots are started. That is the point of the reboot -- to ensure that EBS can get a clean snapshot.

So how does that work?

When you start an EBS snapshot (or when the AMI creator starts one for you), there's a logical split that occurs inside EBS at the moment the snapshot starts.

Your instance can change the contents of the volume after the snapshot starts, but the snapshot process will not see anything that happened after the snapshot process started. The snapshot process essentially has access to a frozen copy of the volume as it existed at the moment the snapshot started.

If you reboot and start a snapshot while the volumes are idle and unmounted (as they would be, during a reboot), the resulting snapshot -- no matter how long it takes to actually create -- captures a perfect image of what was on the volume during that reboot.

1
  • Bonus: you can speed up the creation time of an AMI by taking dummy snapshots of the volume, a few hours before. It has no meaningful impact on the timing of the reboot discussed here, it just means you don't have to wait as long for the snapshots to be ready, because in addition to the frozen-in-time aspect of EBS snapshots, the snapshots will logically reuse any blocks that were already captured in prior snapshots and haven't changed since then. – Michael - sqlbot Sep 5 '17 at 23:52
0

By default, Amazon EC2 shuts down the instance, takes snapshots of any attached volumes, creates and registers the AMI, and then reboots the instance. Choose No reboot if you don't want your instance to be shut down.

Their documentation would make it seem that the reboot is the last step.

So, yes is your answer

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.