Upload
rob-linton
View
2.058
Download
0
Tags:
Embed Size (px)
DESCRIPTION
This presentation was shown at the Australian AWS User group in September in Melbourne and is the presentation side of the step by step guide for migrating AWS EBS backed AMI's between regions. This presentation is designed to be shown in conjunction with the tutorial document.
Citation preview
Rob Lintonwww.Jasondb.com
US-EASTUS-WEST
AMI
Running Instance
VolumeSnapshot
AMI
Running Instance
VolumeSnapshot
How to migrate EBS AMI’s between regions?
Rob Lintonwww.Jasondb.com
Step 1 – Starting with an AMI in US-EAST
Step 2 – Create a Volume from the AMI Root snapshot
Step 3 – Mount the volume on a running EC2 instance
Step 4 – Configure a receiving instance in the destination region
Step 5 – Copy the private key to the source server
Step 6 – Copy the volume from the source server to the destination server.
Step 7 – Create an AMI in the destination region
Steps
Rob Lintonwww.Jasondb.com
Rob Lintonwww.Jasondb.com
US-EAST
AMI
VolumeSnapshot
Step 2 – Create a Volume from the AMI Root snapshot
Rob Lintonwww.Jasondb.com
Rob Lintonwww.Jasondb.com
Rob Lintonwww.Jasondb.com
US-EAST
AMI
Step 3 – Mount the volume on a running EC2 instance
EC2Micro
Instance
EBSVolume/dev/sdf
Source
Rob Lintonwww.Jasondb.com
Rob Lintonwww.Jasondb.com
US-EASTUS-WEST
EC2Micro
Instance
EBSVolume/dev/sdf
Source
EC2Micro
Instance
EBSVolume/dev/sdf
Destination
Step 4 – Configure a receiving instance in the destination region
Rob Lintonwww.Jasondb.com
Rob Lintonwww.Jasondb.com
US-EASTUS-WEST
EC2Micro
Instance
EBSVolume/dev/sdf
Source
EC2Micro
Instance
EBSVolume/dev/sdf
Destination
Step 5 – Copy the private key to the source server
Rob Lintonwww.Jasondb.com
Rob Lintonwww.Jasondb.com
Rob Lintonwww.Jasondb.com
scp -i ping-us-east.pem ping-us-west.pem [email protected]:/tmp
ssh -i ping-us-east.pem [email protected]
Step 5 – Copy the private key to the source server
ssh login command
scp copy command
Rob Lintonwww.Jasondb.com
Rob Lintonwww.Jasondb.com
US-EASTUS-WEST
EC2Micro
Instance
EBSVolume/dev/sdf
Source
EC2Micro
Instance
EBSVolume/dev/sdf
Destination
Step 6 – Copy the volume from the source server to the destination server.
Rob Lintonwww.Jasondb.com
EC2Micro
Instance
EBSVolume/dev/sdf
EC2Micro
Instance
EBSVolume/dev/sdf
dd gzip ssh gzip dd
SourceDestination
Step 6 – Copy the volume from the source server to the destination server.
Breakdown of the steps
$> dd if=/dev/sdf |gzip -c -1 | ssh -i ping-us-west.pem [email protected] "gunzip -c -1 | dd of=/dev/sdf"
Rob Lintonwww.Jasondb.com
US-WEST
VolumeSnapshot
Step 7 – Create an AMI in the destination region
EC2Micro
Instance
EBSVolume/dev/sdf
Destination
Create a snapshot
Rob Lintonwww.Jasondb.com
Rob Lintonwww.Jasondb.com
US-WEST
VolumeSnapshot
Step 7 – Create an AMI in the destination region
EC2Micro
Instance
EBSVolume/dev/sdf
Destination
Create an AMIAMI
Rob Lintonwww.Jasondb.com
Rob Lintonwww.Jasondb.com