Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've been searching for a while for a good tutorial on how could I clone a ec2 instance at aws. I have a VM at aws which is on production, yeah, this is quite important to me so I need to make sure I do it right. What I need to accomplish is create a second vm from this one I have which is curently 'live'. The main objective is to clone this vm in order to do some backups restoration and testing. If anyone could point me a good resource/howto/tutorial that works it'll be awesome.

Thanks.

share|improve this question
    
With or without a few minutes downtime? –  ceejayoz Nov 1 '12 at 2:04
    
Downtime won't be a problem. If having a few minutes downtime would allow me to create a second instance from the live one safely (without risking loosing all my work,this is the most important, obviously) then it's fine. –  cparfon Nov 1 '12 at 2:16
2  
Right click on the instance, select "Create Image". This will make an AMI which you can use to launch as many copies as you like of the original instance. –  ceejayoz Nov 1 '12 at 2:17
    
Hmm. Is it that simple? Does it involves any risks? like crushing my live working instance ? After right clicking on it and choosing "Create image (EBS AMI)" should I choose "Root Volume"? –  cparfon Nov 1 '12 at 2:54
    
See my answer in the answers section –  Drew Khoury Jul 21 '13 at 11:39
add comment

1 Answer

From the AWS Console you can right click your instance and select "Create Image".

You have the option of doing this 'on the fly' (ie without restarting the machine) which bears the risk of consistency issues as you may be writing to the disk while you're trying to back it up.

Ideally you want to allow AWS to shut down the machine and back it up safely. If you've got multiple servers behind a load balancer you can do something like this without taking your while site down (ie take the server out of the load balancer and backup safely).

Backups can take longer for instances with bigger disks.

share|improve this answer
    
For what it's worth, once the "create snapshot" API command returns, it's safe to resume writing to the source volume. There's no need to wait for the image to be complete before starting the source machine back up. –  EEAA May 9 '13 at 5:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.