2

I am having trouble understanding when an EBS Snapshot vs an AMI Image would be optimal.

If for instance, I have an EC2 Instance that contains a LAMP stack, with data in the MySQL database, and some other basic files, would it be sufficient to back this up using an EBS Snapshot or do I need an AMI Image? I understand the AMI Image will also back up the Operating System. I am having trouble understanding whether it is necessary to back up the OS to ensure the MySQL data is backed up.

Alexander
  • 270
  • 5
  • 19
  • 1
    Besides from the answer(s) - this may be useful https://stackoverflow.com/questions/17619580/aws-difference-between-a-snapshot-and-ami – Ersoy May 24 '20 at 20:09

1 Answers1

1

So take a snapshot if you only need the base volume taken as a backup. From this you can only create a new volume. This can also be used to migrate a volume from one AZ to another, or to move it to a different region.

Take an AMI for the following reasons:

  • Take a snapshot of the instance vs the volume, all volumes will have a snapshot taken.
  • To rollout in an auto scaling group as a prebaked image.
  • To duplicate a server

For your case (a MySQL data backup) a snapshot is enough as you’d restore this to a volume and attach to a new instance.

Chris Williams
  • 32,215
  • 4
  • 30
  • 68