[ubuntu-cloud] best way to migrate an ebs backed image between regions

Scott Moser smoser at ubuntu.com
Wed Oct 20 22:09:59 BST 2010


On Wed, 20 Oct 2010, Jonathan Marston wrote:

> Hi,
>
> I'm looking to customize an ubuntu 10.10 ebs backed instance in the us-east region that i will ultimately need to run in the asia-pacific region.
>
> I've use ec2-migrate-image in the past to transfer s3 backed images, specifying the appropriate kernel and ramdisk with the command. But I didn't find any tools for ebs backed images.
>
> I found this guide for transferring:  http://blog.taggesell.de/index.php?/archives/85-Amazon-EC2-How-to-migrate-an-EBS-backed-image-from-US-to-EU-or-wherever.html
>
> Is this guide best practice for such a procedure? Is there a cleaner way to transfer snapshots and reregister images between us-east-1 and ap-southeast-1 ?
>

Well, that is basically the process i'd recommend.
I might suggest:
a.) copying filesystem contents instead of the entire block device
    mount the volume on the source region
    make filesystem on the target region (mke2fs -J)
      for maverick you'd need to take care to filesystem label
    mount the filesystem in the target region
    rsync -azXHAS /mnt other-host:/mnt
b.) compressing network traffic
    (rsync -z will do that).

You could accompllish the transfer by creating a compressed tarfile and
extracting on the other end also.

simply copying the entire block device as the blog suggests is probably
the easiest way, but it would mean
a.) if the volume is 40G in size with 4G used data, you're transferring
   40G.
b.) if the connection drops, you've no way to resume it.

Scott



More information about the Ubuntu-cloud mailing list