who is using Azure Cloud for their application and Microsoft SQL server is hosted on a virtual machine. Soon, they found the need to migrate the application from Azure to AWS due to some amazing features and services of it which would be very helpful to enhance the app & it’s functionalities.
So, in order to do that, my client decided to migrate the Database from VM to Amazon RDS to release the burden of its management along with all the related tasks too. It’s quite difficult to manage a database on a VM. Also, Amazon RDS is a fully managed service & a better platform for running relational databases on Amazon Web Services (AWS).
In this blog, we will do hands on of migrating Microsoft SQL server from Azure VM to Amazon RDS by using AWS Database Migration Service with minimal downtime.
To know more about AWS DMS you may follow the link below : Database Migration Service in AWS
Prerequisites
1. Azure VM With MS SQL Installed , follow the below link for the same.
( https://discourse.ubuntu.com/t/microsoft-sql-server-2019-on-ubuntu-20-04/21943 )
( https://learn.microsoft.com/en-us/azure/virtual-machines/linux/quick-create-portal?tabs=ubuntu )
This Azure VM With Microsoft SQL Server Installed & In Running State
Install the command line tools to interact with it
2. Site To Site VPN Established Connection Among Both Clouds
https://www.netreo.com/blog/connect-azure-using-vpn-gateway-to-aws-vpc/
3. MS SQL Database ( Target ) within Amazon RDS. Create by following this link https://aws.amazon.com/getting-started/hands-on/create-mysql-db/
Let’s get Our hands dirty here…
Create a Replication Instance
Open the AWS Console, search for Database Migration Service and choose Replication Instances from the navigation pane. Then choose to “Create a replication instance”
, provide the required details as shown below.
Select the same VPC in which you have RDS instance for the replication instance as well , in order to keep seamless connectivity throughout the process.
Select the same Availability Zone for Replication Instance as in RDS Instance, Security Group
After you click on the “Create replication instance”
button, AWS provisions your replication instance. When your replication instance is ready to run, its status is “Available”
, as shown.
Note: Go to the Security Groups section in the Amazon EC2 console & Azure VM. You need to check whether your security group allows your replication instance to access your RDS target database and Source database. Set the rule accordingly.
[Good Read: AWS Direct Connect – A Dedicated Gateway for Migration Solution]
Creating Target and Source Endpoints
Target endpoint
First, create the endpoint for your target database. Navigate to the Endpoints section of the AWS DMS console. Choose “Create endpoint”
to create a new endpoint, as shown here.
Select the Target Database created in Amazon RDS.
Enter the following values for the target endpoint, as shown , in the “Username and password”
boxes; enter “Username and password” of the target database that you will connect to.
Click on the “Run test”
button to test the target endpoint. After a few seconds, you should see a Status of successful. After seeing the status value is “successful”
, click on the “Create endpoint”
button .
We have successfully created target endpoint now
Source endpoint
Follow these same steps again to create an endpoint for your source database, as shown .
Note : In Server Name We Have To Mention Private IP Of The Azure VM i.e Source Database
Connection Has Been Established Successfully Between Source Database & Replication Instance
Now we have both target and source database endpoints to move further in the process as shown above
Creating a Migration Task
A migration task is responsible for migrating data from a source database to a target database. In order to start, navigate to the Database migration tasks section of the AWS DMS console. Choose “Create task”
to create a new Database migration task, as shown below.
Choose the source endpoint for your database in Azure VM ( for me, “
source azure) and your target endpoint that we have just created in Amazon RDS ( for me, “database-target”
).
In the “Migration type” section; select the “Migrate existing data”
to perform a one-time process to copy data from your source database to your target database. Use migration type one-time migrations.
You can check more info:
- Cloud
And DevSecOps Solutions
- Devops Solutions
Company USA
- Kubernetes Implementation.
- Streamlining Software
Delivery
Comments
Post a Comment