17

When creating AMI's from an EC2 instance I always check "no reboot", I've been wondering, what are the pros/cons of creating images with/without a reboot? Does keeping the server live affect the quality of the ami produced or is it just as good as a reboot?

8

With a proper shutdown, it's stateless,in cold form and filesystems are sound. Basically nothing is in buffer or "moving around" while its creating the image. I believe the image creation also creates a bit of overhead as well. Rebooting is the most ideal situation an image will be in during creation. This doesn't mean you can't snapshot while it's up or that it's always bad.

1
  • Makes sense, I'm only asking because I had a bad experience once with an instance not rebooting after it was done, on top of this the AMI was also refusing to spawn instances. Sep 7 '12 at 7:33
6

Assuming the image takes a perfect snapshot of the disk at a moment in time you are still at risk of inconsistent data - for example a DB may have started to update a record and has written half to disk while the other half is still in RAM.

Most things will handle this fine, some system will through a fit - for example I used to work with ClearCase and you were nearly guaranteed to get VOB corruption if you didn't shutdown the server to take your backups.

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.