Mongo - how do I find the install path of where the data is for the mongo database?

StackOverflow https://stackoverflow.com/questions/11399019

  •  19-06-2021
  •  | 
  •  

Вопрос

I am trying to do a mongorestore command and I am not sure how to find the directory of where the data is.

The command is something like this:

mongorestore -v --db new_db_dump [path to the dump directory]

and I am not sure how to find where on my local computer the current dump is so I don't know what the [path to the dump directory] is supposed to be.

Any ideas for how to find it? I am on a mac.

Thanks!

Это было полезно?

Решение

By default, mongodump places its output in a sub-directory named "dump" in the current working directory. If you forgot where you were when you executed mongodump, try searching for "dump" in the finder, look at the resulting folders named "dump", and examine the contents. There will be a sub-directory inside "dump" for each of your databases.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top