Mongo Connector Save

MongoDB data stream pipeline tools by YouGov (adopted from MongoDB)

Project README

=============== mongo-connector

The mongo-connector project originated as a MongoDB mongo-labs project and is now community-maintained under the custody of YouGov, Plc.

.. image:: :alt: View build status :target:

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. Detailed documentation is available on the wiki <>__.

Getting Started

mongo-connector supports Python 3.4+ and MongoDB versions 3.4 and 3.6.


To install mongo-connector with the MongoDB doc manager suitable for
replicating data to MongoDB, use `pip <>`__::

  pip install mongo-connector

The install command can be customized to include the `Doc Managers`_
and any extra dependencies for the target system.

|         Target System            |            Install Command                      |
| MongoDB                          | ``pip install mongo-connector``                 |
| Elasticsearch 1.x                | ``pip install 'mongo-connector[elastic]'``      |
| Amazon Elasticsearch 1.x Service | ``pip install 'mongo-connector[elastic-aws]'``  |
| Elasticsearch 2.x                | ``pip install 'mongo-connector[elastic2]'``     |
| Amazon Elasticsearch 2.x Service | ``pip install 'mongo-connector[elastic2-aws]'`` |
| Elasticsearch 5.x                | ``pip install 'mongo-connector[elastic5]'``     |
| Solr                             | ``pip install 'mongo-connector[solr]'``         |

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

System V Service

Mongo Connector provides support for installing and uninstalling itself as a service daemon under System V Init on Linux. Following install of the package, install or uninstall using the following command:

$ python -m mongo_connector.service.system-v [un]install


You can also install the development version of mongo-connector

  git clone
  pip install ./mongo-connector

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 :
-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:

  • Usage with Solr <>__
  • Usage with Elasticsearch <>__
  • Usage with MongoDB <>__

Doc Managers

Elasticsearch 1.x:

Elasticsearch 2.x and 5.x:


The MongoDB doc manager comes 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.
Open Source Agenda is not affiliated with "Mongo Connector" Project. README Source: yougov/mongo-connector
Open Issues
Last Commit
11 months ago

Open Source Agenda Badge

Open Source Agenda Rating