Nosferatu's Pace Maker

    mongodb-elasticsearch-sync
    TypeScript icon, indicating that this package has built-in type declarations

    0.3.0 • Public • Published

    mongodb-elasticsearch-sync

    Syncronize MongoDB and Elasticseach database. Copy and convert all data from a MongoDB database and index it in Elasticsearch.

    oclif Version License

    Usage

    Run this command by giving a MongoDB URI and Elasticsearch URI (no need to install first thanks to npx):

    npx mongodb-elasticsearch-sync \
      --mongodbUri=mongodb://localhost:27017/source \
      --elasticsearchUri=mongodb://localhost:27017/anonymized

    ☝️ Be careful, since Elasticsearch indexed will be reset.

    Options

    Use --singularizeName to transform users collection in MongoDB into user in Elasticsearch.

    npx mongodb-elasticsearch-sync \
      --mongodbUri=mongodb://localhost:27017/source \
      --elasticsearchUri=mongodb://localhost:27017/anonymized
      --singularizeName

    Why

    I recently created a tool to anonymize MongoDB database (from a source db to a target db) to help me build a staging environment for a project. Since I use MongoDB with Elasticsearch for this project, I needed a one-line command to create the Elascticsearch indices after this process.

    Keywords

    Install

    npm i mongodb-elasticsearch-sync

    DownloadsWeekly Downloads

    0

    Version

    0.3.0

    License

    MIT

    Unpacked Size

    13.1 kB

    Total Files

    6

    Last publish

    Collaborators

    • rap2hpoutre