Navigation

Connect to a Cluster using Command Line Tools

Atlas provides instructions for connecting to an Atlas cluster using select MongoDB command line tools in the Command Line Tools tab.

Access the Command Line Tools Tab

To access the Atlas Command Line Tools tab:

  1. From the Atlas UI, use the Context picker in the top-left hand corner to select the Atlas project associated to the cluster you want to connect to.
  2. Click on the button for the cluster. From the picker menu, click Command Line Tools.

You can also click on the cluster in the Atlas UI and select the Command Line Tools tab from the cluster view.

Connect with mongorestore

The Binary Import and Export Tools section of the Command Line Tools tab displays a copyable template with the minimum required options for connecting mongorestore to your Atlas cluster. For instructions on finding the Command Line Tools tab, see Access the Command Line Tools Tab.

The template includes placeholder values for certain options. You must replace these placeholders with the appropriate values for your Atlas cluster:

  • <PASSWORD> - replace this with the password for the user specified in --username. The template includes a MongoDB user for the project as the --username. If you want to authenticate as a different user, replace the value of --username and specify the password for that user in --password.

Include any other mongorestore command line options as required before copying and pasting the command into your system terminal and executing the full command. See mongorestore for complete documentation on the available command line options and how to use them.

Connecting to an Atlas cluster from Microsoft Windows

For users on Windows, specify mongorestore.exe

You may need to provide the full file path to the mongorestore.exe.

Connect with mongodump

The Binary Import and Export section of the Command Line Tools tab displays a copyable template with the minimum required options for connecting mongodump to your Atlas cluster. For instructions on finding the Command Line Tools tab, see Access the Command Line Tools Tab.

The template includes placeholder values for certain options. You must replace these placeholders with the appropriate values for your Atlas cluster:

  • <PASSWORD> - replace this with the password for the user specified in --username. The template includes a MongoDB user for the project as the --username. If you want to authenticate as a different user, replace the value of --username and specify the password for that user in --password.
  • <DATABASE> - replace this with the name of the database you want to export data from

Include any other mongodump command line options as required before copying and pasting the command into your system terminal and executing the full command. See mongodump for complete documentation on the available command line options and how to use them.

Connecting to an Atlas cluster from Microsoft Windows

For users on Windows, specify mongodump.exe

You may need to provide the full file path to the mongodump.exe.

Connect with mongoimport

The Data Import and Export Tools section of the Command Line Tools tab displays a copyable template with the minimum required options for connecting mongoimport to your Atlas cluster. For instructions on finding the Command Line Tools tab, see Access the Command Line Tools Tab.

The template includes placeholder values for certain options. You must replace these placeholders with the appropriate values for your Atlas cluster:

  • <PASSWORD> - replace this with the password for the user specified in --username. The template includes a MongoDB user for the project as the --username. If you want to authenticate as a different user, replace the value of --username and specify the password for that user in --password.
  • <DATABASE> - the name of the database you want to import data into.
  • <COLLECTION> - the name of the collection you want to import data into.
  • <FILETYPE> - the file type of the data source you are importing data from. See –type for more information.
  • <FILENAME> - the name of the data source you are importing data from. See –file for more information.

Include any other mongoimport command line options as required before copying and pasting the command into your system terminal and executing the full command. See mongoimport for complete documentation on the available command line options and how to use them.

Connecting to an Atlas cluster from Microsoft Windows

For users on Windows, specify mongoimport.exe

You may need to provide the full file path to the mongoimport.exe.

Connect with mongoexport

The Data Import and Export Tools section of the Command Line Tools tab displays a copyable template with the minimum required options for connecting mongoexport to your Atlas cluster. For instructions on finding the Command Line Tools tab, see Access the Command Line Tools Tab.

The template includes placeholder values for certain options. You must replace these placeholders with the appropriate values for your Atlas cluster:

  • <PASSWORD> - replace this with the password for the user specified in --username. The template includes a MongoDB user for the project as the --username. If you want to authenticate as a different user, replace the value of --username and specify the password for that user in --password.
  • <DATABASE> - the name of the database you want to export data from.
  • <COLLECTION> - the name of the collection you want to export data from.
  • <FILETYPE> - the file type of the data source you are exporting data to. See –type for more information.
  • <FILENAME> - the name of the data source you are exporting data to. See –file for more information.

Include any other mongoexport command line options as required before copying and pasting the command into your system terminal and executing the full command. See mongoexport for complete documentation on the available command line options and how to use them.

Connecting to an Atlas cluster from Microsoft Windows

For users on Windows, specify mongoexport.exe

You may need to provide the full file path to the mongoexport.exe.

Connect with mongostat

The Set Up Diagnostics section of the Command Line Tools tab displays a copyable template with the minimum required options for connecting mongostat to your Atlas cluster. For instructions on finding the Command Line Tools tab, see Access the Command Line Tools Tab.

The template includes placeholder values for certain options. You must replace these placeholders with the appropriate values for your Atlas cluster:

  • <PASSWORD> - replace this with the password for the user specified in --username. The template includes a MongoDB user for the project as the --username. If you want to authenticate as a different user, replace the value of --username and specify the password for that user in --password.

Include any other mongostat command line options as required before copying and pasting the command into your system terminal and executing the full command. See mongostat for complete documentation on the available command line options and how to use them.

Connecting to an Atlas cluster from Microsoft Windows

For users on Windows, specify mongostat.exe

You may need to provide the full file path to the mongostat.exe.

Connect with mongotop

The Set Up Diagnostics section of the Command Line Tools tab displays a copyable template with the minimum required options for connecting mongotop to your Atlas cluster. For instructions on finding the Command Line Tools tab, see Access the Command Line Tools Tab.

The template includes placeholder values for certain options. You must replace these placeholders with the appropriate values for your Atlas cluster:

  • <PASSWORD> - replace this with the password for the user specified in --username. The template includes a MongoDB user for the project as the --username. If you want to authenticate as a different user, replace the value of --username and specify the password for that user in --password.

Include any other mongotop command line options as required before copying and pasting the command into your system terminal and executing the full command. See mongotop for complete documentation on the available command line options and how to use them.

Connecting to an Atlas cluster from Microsoft Windows

For users on Windows, specify mongotop.exe

You may need to provide the full file path to the mongotop.exe.