- Back to Home »
- amazone , AWS , EC2 , key »
- How to Migrate (Copy) an EC2 Instance between Amazon AWS Regions
Posted by : Debashis
Thursday, September 26, 2013
The real need for this ability to migrate snapshots is to protect your cloud from downtime as a result of AWS outages. Replicating snapshots across availability zones (AZs) and regions will enable you to deploy your online services across AZs and regions. Doing so will protect your cloud from damage and ensure availability during an outage.
This guide demonstrates how to copy a snapshot of a Linux based instance to another region as well as attach a volume to a new instance to complete the instance data migration across regions.
Step-by-Step Process---
1. Go to the AWS Console and select the EC2 Service. Go to the EC2 running instance dashboard and select the running Linux instance. It displays the instance meta data. Note the volume details of the instance. The instance is currently running in the US-West-2 (Oregon) region.
2. Login to the Linux instance, as explained in Connecting to AWS linux instance from a Windows machine. List the data of the instance.
3. Go to Snapshot in the EC2 console and select “Create Snapshot”,. Provide the snapshot name, description and select the volume(Its important) of the instance identified in step #1. Click on the “Create” button.
5. Select the snapshot that the user wants to move to the other region. Right click on the snapshot and select the “copy snapshot” option.
6. Provide the target region and the description for the snapshot. Click on the button “Yes, Copy”.
7. The snapshot copy process will now commence. AWS will display the acknowledgement for the same and provide a link to go to the snapshot console of the target region. Click on the link or manually change the region to go to the target region snapshot console.
8. In the target region (EU-Ireland), the copy process is in progress. AWS will display the progress of the process.
9. After the process is complete, the snapshot will be available in the target region.
10. Create the volume from the snapshot,
11. Select the zone where the volume will be created and provide the remaining details. Click on the button “Yes, Create” to create the volume.
12. Launch a Linux instance in the same zone where the volume from the snapshot has been created.
13. Stop the instance. Detach the root volume of the new instance.
14. Once the root volume has been detached, attach the volume created in step #11 to the instance.
15. Attach the volume as the root volume by mounting on /dev/sda1.
16. Start the Linux instance and login to the instance. The instance will display the content similar to the US-West-2 Linux instance, as shown in step #2.
The above process completes the migration of the user’s instance from one region to another.
Click to Download: The PDF version of this tutorial.