# MongoDB Tools

MongoDB Tools is a suite of command-line utilities for managing data in a MongoDB database. It is open source and self-hosted, installable on TrueNAS.

Canonical page: https://ourlocalhost.com/app/5416/mongodb-tools

## Description

MongoDB Tools is a suite of command-line utilities for managing data in a MongoDB database. It provides mongodump and mongorestore for backing up and restoring data, mongoimport and mongoexport for importing and exporting data in JSON, CSV, or TSV formats, mongostat and mongotop for monitoring server and read/write activity, and bsondump and mongofiles for working with BSON files and GridFS. Designed for database administrators and developers who need reliable CLI-based data management and server monitoring.

## Platform availability

Available on 1 of 10 platforms: TrueNAS.

## Health score

67/100 (Good), based on 5 of 5 factors.
- Maintained: 100 (last commit 3 days ago)
- Popular: 60 (1,057 GitHub stars)
- Easy to install: 15 (0 install platforms, install notes)
- Light to run: 50 (2 GB minimum RAM)
- Security check: 77 (no serious findings, tests, OpenSSF Scorecard 5.8/10)

## Links

- GitHub: https://github.com/mongodb/mongo-tools
- TrueNAS: https://apps.truenas.com/catalog/mongodb
- Documentation: https://docs.mongodb.com/database-tools/

## Common questions

### How do I build MongoDB Tools from source?

Clone the mongo-tools repository, set GOROOT to your Go root directory, and run ./make build; Go 1.15 is the currently used version. The built binaries are placed in the bin directory inside the repository.

### How can I back up and restore a MongoDB database?

Use mongodump to create a binary export of a mongod database. Use mongorestore to restore that dump into a mongod or mongos.

### How can I inspect a BSON dump without restoring it?

Use bsondump to convert BSON dump files into JSON.

### Which command-line tools can I use to monitor a running MongoDB deployment?

Use mongostat for a quick overview of a running mongod or mongos. Use mongotop to see the time a mongod instance spends reading and writing data.

## Alternatives

- Apache Cassandra
- CockroachDB: CockroachDB is a distributed SQL database for developers and operators of transactional applications that need horizontal scaling and resil…
- CouchDB: CouchDB is a document-oriented NoSQL database with a RESTful HTTP/JSON interface for storing, querying, and synchronising JSON documents ac…
- FerretDB: FerretDB is an open-source MongoDB compatibility proxy for self-hosted stacks.
- KeyDB: KeyDB is a distributed, Redis-compatible key-value database that adds true multi-master replication, letting any number of servers accept w…
- Microsoft SQL Server: SQL Server delivers on Microsoft’s Data Platform vision by helping your organization manage your data by enabling you to store data from st…
- MySQL Community Edition: Free GPL database platform supporting SQL and NoSQL applications with InnoDB storage, replication, clustering, connectors, and cross-platfo…
- PostgreSQL: PostgreSQL (Postgres) is an open source object-relational database known for reliability and data integrity.
- RavenDB: RavenDB is an open-source, transactionally consistent document database that stores application data in flexible records, helping developer…
- Redis: Redis is a fast, in-memory data structure store that can be used as a database, cache, and message broker.
- SQLite: SQLite is a lightweight, embedded relational database engine that stores an entire database in a single file on your device.
- SurrealDB: SurrealDB is a modern "all-in-one" database that stores and organises your app's information.

---
Source: Our Local Host (https://ourlocalhost.com/app/5416/mongodb-tools), the self-hosted and open-source app directory.
