How to import dump folder into mongodb database?

Sangram Badi picture Sangram Badi · Feb 8, 2018 · Viewed 29.2k times · Source

I have created a mongo dump from a remote server and .bson and .metadata files stored in to a folder.

I want to import this folder into my local mongodb. I am using robomongo as a mongodb client ui.

I got some command which are importing json files one by one but I want import all the files at a time by robomongo or cmd.

Answer

Bilash picture Bilash · Feb 8, 2018

Try with this:

mongorestore -d db_name dump_folder_path