Windows Professional 10
MongoDB 3.6.4 2008R2Plus SSL (64 bit) (before computer crash)
MongoDB 4.0.2 2008R2Plus SSL (64 bit) (after computer crash)

I have been developing locally, and turned on computer today to blue screen of death.

I had no option but to reset Windows 10 and keep personal files.

I therefore have this directory:

C: > data

which contains two directories, db and log.

Below is contents of directory db:

enter image description here

Below is contents of directory log:

enter image description here

I have downloaded and installed:

MongoDB 4.0.2 2008R2Plus SSL (64 bit)

and I accepted the default installation directories:

enter image description here


How can I restore the databases and collections from the contents of my original mongoDB data directory?

Note - I am on the same computer, after a Windows 10 reset, and new install of MongoDB.

Related Questions

There are similar questions below, but they don't seem to provide an authoritative and accepted answer:

How to restore .wt backup file to local MongoDB?

How to copy wt files from another mongo instance?



1 Answer 1


Some sort of benevolent magic occurred after doing the following:

Remove MongoDB Community Edition as a Windows Service, see here.

sc.exe delete MongoDB

Then when I went into my favourite MongoDB GUI (Robo3T), the databases were just there!

So i ran:


To get a "proper" dump of all my databases.

I'm confused how this could happen because the databases are still at their original location:


And the new MongoDB installation data location was:

C:\Program Files\MongoDB\Server\4.0\data\


Atleast I have a proper mongodump backup now.

  • Its not working for me, please can help me in this, I dont get removing as service than how your Robo3T got connected to mongodb Commented Apr 9, 2021 at 9:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.