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