Forrest logo
back to the mongodump tool

mongodump:tldr:e58f9

mongodump: Specify an output location for the dump.
$ mongodump --out ${path-to-directory}
try on your machine

The mongodump command is a utility provided by MongoDB that allows you to create a backup of the data stored in a MongoDB database. The --out option is used to specify the output directory where the backup data will be stored.

In the command you provided, mongodump --out ${path-to-directory}, ${path-to-directory} is a placeholder for the actual path to the directory where you want to store the backup data. You need to replace ${path-to-directory} with the appropriate directory path on your system.

For example, if you want to store the backup data in a directory called "backup" located in your home directory, the command would be:

mongodump --out ~/backup

This will create a backup of your MongoDB database and save it in the specified directory. The backup will consist of files containing the database data in BSON format.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the mongodump tool