Move Amazon EC2 EBS Ubuntu to Microsoft Azure

998 views Asked by At

I want to move my Amazon AWS EC2 Ubuntu instance with EBS to Microsoft Azure. This instance wasn't previously imported to the AWS, so I cannot use AWS import/export tools.

So the main question is how to grab VHD image from AWS and upload it on S3 or local drive?

2

There are 2 answers

0
Naveen Vijay On

There isn't a straight forward way to migrate from AWS to Azure or rather make use of Complete VHD handling.

  1. One obvious but mundane way would be to recreate the instance from scratch in Azure, then going back to AWS zipping the files, upload to S3 and download them in Azure instance again.

  2. Try to dockerize your environment in AWS, back up your docker cimages / containers and come back to Azure's instance and set them back. (Recommended)

0
Ghassan Zein On

Well technically there's no simple tool to migrate your EC2 instances from AWS to Microsoft Azure yet, but you can follow these steps in order to do the best migration currently possible:

1- Mimic your architecture of servers on your Azure account by keeping eyes on number of VMs, Network, Storages, and other services if found.

2- Make the correct setup on those servers (configure your web server, db server, etc..)

3- Zip all of your data files found on EC2 (/var/www/Web_Folder) and use mysqldump to backup your database as well.

4- Create a windows server VM on Azure that you can connect to Remotely (Profit from the cloud internet speed) and use filezilla to download your zipped files from EC2 and then upload them back to newly created VMs on Azure. Upload your db backup file there as well.

5- Create a new database on your Azure VMs with the same old name, give user access, exit mysql and then restore your db backup file that you uploaded using: mysql -u root -p DB_Name

6- Do not forget to open the needed ports for your newly created servers (Web, Mysql, etc...), and make sure you manage permissions for the newly uploaded files.