Skip to content

Information about the scaling and sharding of Amazon DocumentDB

0

HI Team,

is it possible to start with instance-based clusters and later migrate to Elastic based Clusters.

I went thought the document : https://docs.aws.amazon.com/documentdb/latest/developerguide/docdb-using-elastic-clusters.html but mentions to use migration service to migrate from mongoDB to elastic clusters but does not mentions if I can use to migrate from instance-based clusters to migrate to Elastic based Clusters.

asked a year ago408 views
1 Answer
0

Yes you can migrate from an Instance based cluster to an Elastic cluster. I would look at the following procedure just using open source mongodump and mongo restore . . .

Use mongodump to dump the data from the source DocumentDB instance cluster:

mongodump --uri="mongodb://<username>:<password>@<source-cluster-endpoint>:27017/<database_name>"

Create the sharded database and collections in the target Amazon DocumentDB Elastic Cluster.

Migrate the indexes from the source cluster to the target Elastic Cluster.

Restore the data using mongorestore:

mongorestore --uri="mongodb://<username>:<password>@<target-cluster-endpoint>:27017/<database_name>" dump/

You can set up and run an AWS Database Migration Service (AWS DMS) task in Change Data Capture (CDC) mode if you want to replicate ongoing changes from the source cluster to the target Elastic Cluster.

Update your application to use the endpoint of the Amazon DocumentDB Elastic Cluster as the new database endpoint.

For more detailed information on the migration process, including prerequisites, index handling, and monitoring, please refer to the AWS Documentation:

https://docs.aws.amazon.com/documentdb/latest/developerguide/docdb-using-elastic-clusters.html

Hybrid Approach for Homogeneous Migration to an Amazon DocumentDB Elastic Cluster

AWS
answered a year 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.