How to install mongoexport on Ubuntu

mongoexport is a command-line tool that produces a JSON or CSV export of data stored in a MongoDB instance. This post describes how to install mongoexport on Ubuntu.

: Download the Database tools package


: Install downloaded Database tools package

sudo apt install ./mongodb-database-tools-*-100.5.0.deb

: Verify installation by exporting MongoDB collection data

mongoexport --uri="mongodb+srv://username:password@hostname/database"  --collection=collection_name --out=output.json

Category: DA