...
Get the MongoDB URIs
Obtain the source MongoDB URI in the format:
mongodb+srv://<username>:<password>@<source-cluster>
Get the MongoDB target URI in format from the Galaxy Database team:
mongodb://<username>:<password>@<destination-host>:<port>
Info |
---|
This procedure should not be used for MongoDB Sharded clusters. |
Run the Docker Container
Use the following command to run the migration container:
Code Block language sh docker run --rm \ -e SOURCE_URI="" \ -e TARGET_URI="" \ -e DB_NAME="simpletask" \ meteor/galaxy-mongodb-migrate:202409101534
Replace
SOURCE_URI
,TARGET_URI
, andDB_NAME
with your actual values.
Example
Code Block | ||
---|---|---|
| ||
docker run --rm \ -e SOURCE_URI="mongodb+srv://username:password@source-cluster.mongodb.net" \ -e TARGET_URI="mongodb://username:password@destination-host-01.mongodb.net:27017,destination-host-02.mongodb.net:27017,destination-host-03.mongodb.net:27017/admin?replicaSet=replicaSetName" \ -e DB_NAME="simpletask" \ meteor/galaxy-mongodb-migrate:202409101534 |
...