5

BTW, I'm running my LAMP server on m1.Small (running on Amazon AMI 32bit) at the moment. (EBS)

Data regarding this question Linux and its configuration (e.g. Timezone) apps I install (e.g. s3cmd, apache) "/var/www/html" - where my Web is stored mysql data After hours of googling and reading their help manuals I am confused with concepts as the following. * Images have 1,2,3,4 * Volumes have 2,3,4? (i.e. No OS data in Volume)

Is my understanding correct?

So if I want to go back to a specific snapshot. Using Volumes. (i.e. only works if they share the same AMI) 1. create the Volume from the snapshot 2. detach a Volume from the instance 3. attach the new Volume created by above process to the instance

Using Images. 1. create Image from snapshot 2. launch an instance from the Image 3. Associate Old Elastic IP to the New instance 4. Terminate Old instance etc

I'm sure I am misunderstanding something here. Basically what the difference between Images and Volumes?

user706087
  • 359
  • 1
  • 5
  • 17
  • http://serverfault.com/questions/268719/amazon-ec2-terminology-ami-vs-ebs-vs-snapshot-vs-volume just found a smailar question. I will decide to close this question after i read it. – user706087 Oct 28 '11 at 10:28
  • omg. after reading it. I'm even more confused :D. – user706087 Oct 28 '11 at 10:39

1 Answers1

14

Your descriptions of how to get back to old copies of the system are pretty much correct, you just ned a little clarification in terminology.

An EBS volume is like a hard disk drive connected to your instance.

You can have multiple volumes attached at the same time at different mount points, just like on a physical server.

One of those volumes has the root file system with the core of the OS you are running. It might also have your web pages and MySQL data or you might configure those on a separate attached volume.

A snapshot is like a copy of a hard disk drive that can be used to create new hard disk drives (volumes) with the same content. You can take snapshots of any volume(s), os root or data. When you create a new AMI (image) it is done using snapshots.

An AMI is a snapshot of the root EBS volume that is also registered in a special way so that it can be used to start new instances. The registered AMI can also reference additional snapshots that should be copied to new volumes and attached to the new instance.

You can detach and attach non-root volumes from/to instances while they are running. You can also detach and attach root EBS volumes, but only while the instance is stopped (not common, but occasionally useful).

A data volume can be moved or copied between instances even if they are not running the same AMI.

Eric Hammond
  • 22,089
  • 5
  • 66
  • 75
  • thanks Eric. I'm using On-demand small instnace now. Today I wanted to test High-CPU instance any better for my site, so I launched a SPOT instance using the IMAGE created by my running small instance snapshot. I associate my Elastic IP to new spot (and private key pair etc just as I would for On-Demand instance), but I couldn't connect to my SPOT instance by SSH, and the site didn't appear either (of course I need to log in, then start apache & mysql server for my site to work) I terminated this SPOT after about half an hour cos I didn't want to waste more money). – user706087 Oct 28 '11 at 20:33
  • Is it because 1. SPOT instnance CANNOT be launched as a stand alone server, and only On-Demand & Reserved instances can launch OS contained instances (I noticed that it doesn't have Public DNS) or 2. SPOT instnace is just very slow so I should've waited longer? Thanks again!! – user706087 Oct 28 '11 at 20:33
  • You answered my understanding is correct, but I didn't get it work. So I asked if it's due to SPOT instance or not. (in short) – user706087 Oct 29 '11 at 20:33
  • @user706087: Try to get your AMI to work with an on-demand instance fist, then try to save money with spot instances. – Eric Hammond May 02 '13 at 21:02