Posts Tagged: reserved instance


28
Oct 09

Backing up and restoring an Amazon instance, take 2

Today I realized you have to be really careful on how the Amazon instances are assigned if you are using reserved instances. I did the math and figured out that buying a reserved instance will probably be ideal for me since I rarely need to scale, other than the few times I might be testing how to scale.

So I bought the m1.small instance and had it placed in the best available place automatically. It went to eu-west-1b. Then I created my first instance and started enjoying my 0.04 per hour charge. The account activity was though something else, running at the normal 0.11 per hour rate. Then I had a look at the exact location where I had my instance placed. It was eu-west-1a, not 1b. Though that was chosen automatically as well. Sigh. I also had my EBS volume in 1a as well. I am not sure if you can actually even mix those. I would guess not.

So I pretty much had to do the same thing again which I was doing yesterday. I wanted to give another shot at that fstab issue if it could be solved, so I decided to bundle the image again. I also snapshotted the EBS volume and created a volume out from the snapshot and placed the volume in eu-west-1b. I got my bundle uploaded to S3, so I proceeded to initiate it. Once again, the AWS management console was lagging a bit and did not give me the small instance and actually no RAM ID nor Kernel ID either. Waiting a bit helped here and I got my IDs and small instance as well. I don’t even know what those IDs are, but I guess they are important somewhat…

I was then able to boot up my instance at the glorious eu-west-1b availability zone. I attached the EBS volume created from the snapshot, but the fstab was once again missing the mountpoint, so I had to add that and reboot. MySQL and Apache started fine this time and the site was up. The last thing was to change the Elastic IP to point to the new host and shut down the old server and clean up the old snapshots and EBS volumes. The whole thing took around an hour while sitting on sofa and watching the evening news at the same time.

I had a look at my Account Activity, but so far there has not been any new information about the 0.04 charge… I really hope this was not all for nothing! 
 

Pauli Haikonen