How to create an AMI backup out of EC2 instance

Login to the server which has to backed up.

Create the bundle of the Operating system. You should avoid big disks like EBS while creating the bundle

ec2-bundle-vol –cert /root/key/cert-XXXXXX.pem –privatekey /root/key/pk-XXXXXX.pem -d /mnt -e /ebs –user 4091-5433-5954 -r x86_64 –debug

-e = exclude

-d=destination where file has to be created.

Upload the bundlie:-

ec2-upload-bundle -b Server-backup-$MONTH –manifest /mnt/image.manifest.xml  –access-key XXXXXXX –secret-key bKxxxxxxxxxxxxxx

Register the bundle:-

ec2-register “Server-backup-$MONTH/image.manifest.xml” -C /root/key/cert-XXXXXXXX.pem -K  pk-xxxxxxxxx.pem      Server

Thats it !!… You can find the AMI in amazon aws console. If you want to create a new instance out of it, right click AMI -> create new instance and follow the instructions.




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: