Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. 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>

      image-20240522-193427.png

Info

This procedure should not be used for MongoDB Sharded clusters.

  1. Run the Docker Container

    Use the following command to run the migration container:

    Code Block
    languagesh
    docker run --rm \
      -e SOURCE_URI="" \
      -e TARGET_URI="" \
      -e DB_NAME="simpletask" \
      meteor/galaxy-mongodb-migrate:202409101534
    

    Replace SOURCE_URI, TARGET_URI, and DB_NAME with your actual values.

Example

Code Block
languagesh
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

...