-
Notifications
You must be signed in to change notification settings - Fork 478
Usage with MongoDB
Luke Lovett edited this page Feb 20, 2014
·
8 revisions
Mongo Connector can replicate from one MongoDB replica set or sharded cluster to another using the Mongo DocManager. The most basic usage is like the following:
mongo-connector -m localhost:27017 -t localhost:37017 -d mongo_doc_manager.py
This assumes you are running a replica set or sharded cluster on ports 27017 and 37017 of the local machine.
- Even though replication is mongo-to-mongo, Mongo Connector still needs to insert the
_ts
andns
fields in order to handle rollbacks and provide renaming features. - Mongo Connector is "upsert only." This means that when a document is updated, the original document is overwritten with the latest version of that document on the source cluster. This is not the normal behavior of MongoDB replication, and it can result in short-lived discrepancies between the source and target MongoDB clusters.
TODO!