RDS - Aurora Serverless - is that possible to Migrate from Aurora Serverless to Aurora Provisioned ???

0

Say I am running Aurora serverless cluster(MySql). If in case I need to go back to Aurora Provisioned (MySql), is this possible to migrate?

1 Answer
1

Hello,

Thanks for reaching out to us.

Please allow me to inform you that there are 2 methods that can be used to achieve your use-case.

Below are the details and the high level steps to perform each:



  1. Using snapshot restore method:

—> This method involves the creation of a snapshot of the existing Serverless cluster and then restoring the snapshot into a provisioned cluster. 



—> Here are the high level steps that you will need to perform:



i. Stop application activity and traffic accessing the source Serverless database. ii. Take a snapshot of current Aurora Serverless cluster [1] iii. Restore snapshot to a new cluster [2]. Make sure to choose "Capacity type" as "Provisioned" while doing the restore. iv. Use the new provisioned Aurora cluster endpoint(s) to connect to database (or rename the clusters).

—> Please note that the above method will require application level changes because you will need to update the application to use the new provisioned cluster endpoint after the restoration is complete. 



—> If you wish to keep the cluster endpoint the same as before, then you will need to rename the Serverless cluster to some other name right after Step (i), and while restoring the snapshot to the provisioned cluster in Step (iii), enter the same name that Serverless cluster was using before.



—> In this way, you will be able to migrate to the provisioned cluster without having to change your application code.




2. Using MySQL client utility 'mysqldump
'


—> In this method, you can create a logical dump of your data that resides on the Serverless cluster and then import the dump into a new provisioned cluster.

—> Here are the steps that you can follow:



i. Stop application activity and traffic accessing the source Serverless database. 

ii. Create a mysqldump file [3] from the existing Serverless cluster
 iii. Create a new cluster that is configured with Capacity Type as Provisioned. iv. Import the created dump file into the writer instance of the new provisioned cluster.


—> You may follow the approach mentioned under snapshot restore method, in order to have the same name and endpoint for the new cluster, to avoid application level changes. 




In order to avoid data loss between the two clusters, you would need to stop all write activity on the source serverless cluster just before the point of snapshot creation/mysqldump creation until the restoration/migration of the provisioned cluster is completed. This is because, Aurora Serverless v1 clusters do not support binary log replication [4]. So, it is not possible to replicate the changes from the serverless cluster to the provisioned cluster after the creation of snapshot/mysqldump file, unless the changes are replicated manually.

Thus, I would suggest you to plan the migration in a quiet period which has less activity on the database. Once migration is done, please resume the traffic on the new target cluster

References:




[1] Creating a DB cluster snapshot - https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_CreateSnapshotCluster.html

[2] Restoring from a DB cluster snapshot - Restoring from a snapshot - https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_RestoreFromSnapshot.html#USER_RestoreFromSnapshot.Restoring

[3] mysqldump — A Database Backup Program - https://dev.mysql.com/doc/refman/5.6/en/mysqldump.html

[4] Limitations of Aurora Serverless v1 clusters - https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html#aurora-serverless.LIMITATIONS

AWS
EXPERT
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions