No description or website provided.
Python Shell
Latest commit a673bfb Dec 2, 2016 @ShaneHarvey ShaneHarvey committed on GitHub Gracefully exit on SIGTERM (#595)
And handle SIGINT in the same way.



View build status

For complete documentation, check out the Mongo Connector Wiki.

System Overview

mongo-connector creates a pipeline from a MongoDB cluster to one or more target systems, such as Solr, Elasticsearch, or another MongoDB cluster. It synchronizes data in MongoDB to the target then tails the MongoDB oplog, keeping up with operations in MongoDB in real-time. It has been tested with Python 2.6, 2.7, and 3.3+. Detailed documentation is available on the wiki.

Getting Started


The easiest way to install mongo-connector is with pip:

pip install mongo-connector

You can also install the development version of mongo-connector manually:

git clone
cd mongo-connector
python install

You may have to run python install with sudo, depending on where you're installing mongo-connector and what privileges you have.

Using mongo-connector

mongo-connector replicates operations from the MongoDB oplog, so a replica set must be running before startup. For development purposes, you may find it convenient to run a one-node replica set (note that this is not recommended for production):

mongod --replSet myDevReplSet

To initialize your server as a replica set, run the following command in the mongo shell:


Once the replica set is running, you may start mongo-connector. The simplest invocation resembles the following:

mongo-connector -m <mongodb server hostname>:<replica set port> \
                -t <replication endpoint URL, e.g. http://localhost:8983/solr> \
                -d <name of doc manager, e.g., solr_doc_manager>

mongo-connector has many other options besides those demonstrated above. To get a full listing with descriptions, try mongo-connector --help. You can also use mongo-connector with a configuration file.

If you want to jump-start into using mongo-connector with a another particular system, check out:

Doc Managers

Elastic 1.x doc manager:

Elastic 2.x doc manager:

The Solr doc manager and the MongoDB doc manager come packaged with the mongo-connector project.


Having trouble with installation? Have a question about Mongo Connector? Your question or problem may be answered in the FAQ or in the wiki. If you can't find the answer to your question or problem there, feel free to open an issue on Mongo Connector's Github page.