For AI agents: a documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.
Docs Menu

Install the MongoDB Database Tools

Download from the MongoDB Download Center. To install with a package manager, select your operating system and package management method in the following steps.

Note

If you already installed the MongoDB Server with your system's package manager, you likely already have the Database Tools installed. The following command determines if the Database Tools are already installed on your system:

sudo dpkg -l mongodb-database-tools
1

Open the MongoDB Download Center. Using the drop-down menu on the right-hand side of the page:

  1. Select your Linux Platform and Architecture.

  2. Select the deb Package.

  3. Click the Download button.

If installing on a headless Linux system, click Copy Link to the right of the Download button to copy the download link, then use a command line tool such as wget or curl to download the .deb directly on your Linux system.

2

Navigate to the directory containing the downloaded .deb package, then run the following command to install the Database Tools using the apt package manager:

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

Note

Be sure to include the leading ./ in the command above, which instructs apt to look for this file in the local directory instead of searching remote repositories.

3

After you install, you can run any of the Database Tools directly from your system's command line. For tool details, see the tool's reference page.

To check the version installed, run the following command:

mongodump --version

Note

If you already installed the MongoDB Server with your system's package manager, you likely already have the Database Tools installed. The following command determines if the Database Tools are already installed on your system:

sudo yum list installed mongodb-database-tools
1

Open the MongoDB Download Center. Using the drop-down menu on the right-hand side of the page:

  1. Select your Linux Platform and Architecture

  2. Select the rpm Package

  3. Click the Download button

If installing on a headless Linux system, click Copy Link to the right of the Download button to copy the download link, then use a command line tool such as wget or curl to download the .rpm directly on your Linux system.

2

Navigate to the directory containing the downloaded .rpm package, then run the following command to install the Database Tools using the yum package manager:

sudo yum install -y mongodb-database-tools-*-100.20.0.rpm
3

After you install, you can run any of the Database Tools directly from your system's command line. For tool details, see the tool's reference page.

To check the version installed, run the following command:

mongodump --version
1

Open the MongoDB Download Center. Using the drop-down menu on the right-hand side of the page:

  1. Select your Linux Platform and Architecture.

  2. Select the tgz Package.

  3. Click the Download button.

If installing on a headless Linux system, click Copy Link to the right of the Download button to copy the download link, then use a command line tool such as wget or curl to download the .tgz directly on your Linux system.

2

Run the following command from the directory containing the downloaded .tgz package:

tar -zxvf mongodb-database-tools-*-100.20.0.tgz
3

You may wish to make the Database Tools available in your system's PATH environment variable, which allows referencing each tool directly on the command line by name, without needing to specify its full path, or first navigating to its parent directory.

You can either:

  • Copy the DB Tools binaries from the extracted directory into a directory already listed in your PATH, such as /usr/local/bin. Navigate into the extracted directory, then run the following command to copy the binaries:

    sudo cp * /usr/local/bin/
  • Add the DB Tools installation directory to your PATH, by editing your shell's configuration file. For example, in bash, you would edit the ~/.bash_profile file.

4

Once installed, you can run any of the Database Tools directly from your system's command line. For tool details, see the tool's reference page.

To check the version installed, run the following command:

mongodump --version

Note

Installing the MongoDB Server with Homebrew also installs the Database Tools. The following command determines if the Database Tools are already installed on your system:

brew list | grep mongodb-database-tools
1

macOS does not include the Homebrew brew package by default. Install brew using the official Homebrew installation instructions.

2

In your macOS Terminal, run the following command to download the official MongoDB Homebrew formulae for MongoDB and the Database Tools:

brew tap mongodb/brew

Then, mark the tap as a trusted source:

brew trust mongodb/brew
3

In your macOS Terminal, run the following command to install the MongoDB Database Tools:

brew install mongodb-database-tools

Tip

Once installed, you can later update the Database Tools with:

brew upgrade mongodb-database-tools
4

Once installed, you can run any of the Database Tools directly from your macOS Terminal. For tool details, see the tool's reference page.

To check the version installed, run the following command:

mongodump --version
1

Open the MongoDB Download Center. Using the drop-down menu on the right-hand side of the page:

  1. Select the macOS x86_64 Platform.

  2. Select the zip Package.

  3. Click the Download button.

2

You can either:

  • Double-click the downloaded Zip archive to unpack it.

  • In your MacOS Terminal, navigate to the directory containing the downloaded Zip archive, then run the following command:

    unzip mongodb-database-tools-*-100.20.0.zip
3

You may wish to make the Database Tools available in your system's PATH environment variable, which allows referencing each tool directly on the command line by name, without needing to specify its full path, or first navigating to its parent directory.

You can either:

  • Copy the DB Tools binaries into a directory listed in your PATH variable, such as /usr/local/bin. Run the following command from the directory containing the DB Tools binaries:

    sudo cp * /usr/local/bin/
  • Add the DB Tools installation directory to your PATH, by editing your shell's configuration file. For example, in bash, you would edit the ~/.bash_profile file.

4

Once installed, you can run any of the Database Tools directly from your macOS Terminal. For tool details, see the tool's reference page.

To check the version installed, run the following command:

mongodump --version
1

Open the MongoDB Download Center. Using the drop-down menu on the right-hand side of the page:

  1. Select the Windows x86_64 Platform.

  2. Select the msi Package.

  3. Click the Download button.

2

Double-click the downloaded MSI installer to install the Database Tools. During the install you may customize the installation directory if desired.

3

You may wish to make the Database Tools available in your system's PATH environment variable, which allows referencing each tool directly on the command prompt by name, without needing to specify its full path, or first navigating to its parent directory.

Once you've installed the Database Tools, follow the instructions below to add the install directory to your system's PATH environment variable.:

  1. Open the Control Panel.

  2. In the System and Security category, click System.

  3. Click Advanced system settings. The System Properties modal displays.

  4. Click Environment Variables.

  5. In the System variables section, select Path and click Edit. The Edit environment variable modal displays.

  6. Click New and add the filepath to the location where you installed the Database Tools.

  7. Click OK to confirm your changes. On each other modal, click OK to confirm your changes.

Once set, you can run any of the Database Tools directly from your command prompt. For tool details, see the tool's reference page.

To check the version installed, run the following command:

mongodump --version
1

Open the MongoDB Download Center. Using the drop-down menu on the right-hand side of the page:

  1. Select the Windows x86_64 Platform.

  2. Select the zip Package.

  3. Click the Download button.

2

Double-click the downloaded Zip archive to unpack it and copy the Database Tools from the bin directory to your computer's filesystem.

3

You may wish to make the Database Tools available in your system's PATH environment variable, which allows referencing each tool directly on the command prompt by name, without needing to specify its full path, or first navigating to its parent directory.

Once you've copied the Database Tools to the desired location on your filesystem, follow the instructions below to add that location to your system's PATH environment variable.:

  1. Open the Control Panel.

  2. In the System and Security category, click System.

  3. Click Advanced system settings. The System Properties modal displays.

  4. Click Environment Variables.

  5. In the System variables section, select Path and click Edit. The Edit environment variable modal displays.

  6. Click New and add the filepath to the location where you copied the Database Tools.

  7. Click OK to confirm your changes. On each other modal, click OK to confirm your changes.

Once set, you can run any of the Database Tools directly from your command prompt. For tool details, see the tool's reference page.

To check the version installed, run the following command:

mongodump --version

The Database Tools include the following binaries:

Binary Import / Export

    mongodump

Creates a binary export of the contents of a mongod database.

Restores data from a mongodump database dump into a mongod or mongos.

    bsondump

Converts BSON dump files into JSON.

Data Import / Export

Imports content from an Extended JSON, CSV, or TSV export file.

Produces a JSON or CSV export of data stored in a mongod instance.

Diagnostic Tools

    mongostat

Provides a quick overview of the status of a currently running mongod or mongos instance.

    mongotop

Provides an overview of the time a mongod instance spends reading and writing data.

GridFS Tools

Supports manipulating files stored in your MongoDB instance in GridFS objects.

After you install the Database Tools, use the following tools to work with your MongoDB data: