How to migrate Amazon RDS database from one region to another in AWS

  Reading Time:

We are going to see how to migrate RDS database from one region to another  

We are going to achieve this by taking a snapshot of the existing database in RDS then copying it to another region and then restoring the DB from snapshot in new  region  

Sequence explained below

First go to RDS dashboard

 

Click on snapshots link on the left to view all the db snaphots already taken then click 'Take snapshot' button on the right top

 

Create a new snapshot of the current DB state, give it a name as shown below and click ‘Take snapshot’ button at the bottom

 

You will see the snapshot getting created under status column

 

The status will change to 'available' after few minutes (Go get a cup of coffee ☕)

 

Next copy the newly created snapshot to a different target AWS region

 

Select the AWS region , in this case it is Singapore and give it a new name

 

When you click copy snapshot you might get this error if you don’t have a KMS key for encryption in the new region , in our case we don’t have it in Singapore region

 

So go to AWS Key management service under Singapore region and click 'Create a key' and follow the steps

 

Give key name and description and select type as KMS then click 'Next'

 

Select all permission based on your requirement , here we choose to give all the permissions so we select all check box option on top

 

Once we create the key we get success message

 

Go back to copy DB snapshot  and select the newly created key in master key drop down and click 'Copy Snapshot' button

 

Copy task gets initialized and you will see the status as copying , this takes a few minutes (Go get your second cup of coffee ☕)

 

The status will get updated as available once competed

   

Click the 'Restore Snapshot' after selecting the correct snapshot to be restored in the new region

   

The database creation from snapshot starts once we click restore  and this takes a while so go get your third cup of coffee . The creation process creates only a DB writer instance in cluster

   

Now we shall create a reader DB instance

   

We see the reader DB instance getting created

   

Now we see the cluster run with reader and writer instance in the new AWS region(Sinagpore)

   

Summary

We just saw how we can migrate a DB from AWS region Mumbai to new AWS region Singapore

All the settings like DB username and password are copied to new region via the snapshot so we don’t have to configure those kind information in this new cluster

Now we can start using the new DB cluster in new AWS region

How to setup NGINX reverse proxy for application server dev and prod setup with Let’s Encrypt SSL certificate on Ubuntu 18.04

Assume we have two app servers running on port 8181 and 8080 Prod on 8080 and dev on 8181We want to redirecthttp --> https --&...

Setup SonarQube on Ubuntu 18.04

Hardware Requirements Source : https://docs.sonarqube.org/latest/requirements/requirements/SonarQube server requires at least 2GB of RAM to run efficiently and 1GB of free RAM...

App & Geek   Never miss a story from App & Geek, get updates in your inbox.