The Complete Story on creating a copy of your AWS site, or restoring an AWS server from a Snapshot
One of the most important parts of having a site running in AWS ( the amazon cloud) is the ability to add new copies of a server instance very quickly. What you will find however is that Windows servers don't ' clone ' very cleanly. If you are trying to create an AMI image that can be used to boot a new copy of a site, the windows server will shutdown during the process. Sometime the image will be clean and can restart, other time parts of the image (or the whole image) isn't usable.
Here are the simple steps, for a fairly straightforward process of creating a new copy of an AWS EC2 server. (It can also be used to increase the volume sizes of an existing server.
Also, you can use this to create a new server from a snapshot in case your server has crashed or gone bad for some other reason.
If you see any parts that aren't clear, please let us know so we can help and then add the details (or clarifications) to this document
- Login to the AWS management console
-
Under the EC2 tab, select the image you wish to clone and look for 1) the ami it was created from,
the security policies applied to it,
the zone (availability zone it runs in)
type (of server) - this can be changed depending what you are trying to do -
Look under instances to see which volume that you want the snapshot from
(note the volumes and the mount point (ie /dev/sda1) - If you are looking for a new snapshot, take a snapshot of the volume(s) you identified. Otherwise, you can use a previous snapshot (one of the nightly snapshots for example)
-
Create a new instance in the same zone using the parameters identified above
(note the new instance name) - Stop this new instance
- Look in the volumes area - find the volumes from the active server you documented to get their current size
this also shows the zone and the /dev/sda1 (attachment point) - just to validate the information you took above - Go to snapshots area - In the search box, type the volume name you are looking to get a snapshot from
- Select snapshot for that volume that you would like to bring up as a copy
- At the top of that screen (once you have selected the snapshot) you can ' create a volume ' based on the snapshot.
- During the creation, pick the same availability center as instance. You can increase the size of the volume from the original if you wish.
- Go to the volumes tab - select the volume from the new instance that you created.
- Once its selected, you can select ' detach volume '
- Select your new volume created above.
- Select attach and attach it to your instance in the drop down. If you don't see your instance, most likely you created it in a different availability zone then the volume. They most be in the same. (For example - not just US-EAST, but us-east-1b.
- Attach the device as /dev/sda1 . This is true for both windows and linux.
- If you have more devices, attach them using the same mount points (attachment points) as the original server.
- Now, select your instance and under actions, select start.
That's it. You should have a clone of your server.. either windows or linux. Enjoy!

