mongodbwiredtiger

How to restore data from legacy MongoDB missing / revert to previous mongo iteration?


I moved mongo files (*.ns, *.0, *.1, etc.) to an external drive, then upgraded to the latest mongo version, After I couldn't access those files anymore, but this sort of thing had worked with earlier versions.

How do I reverted to a previous version of mongo (MMAPv1), that would allow this, or access this data from the current version? I think WiredTiger was the problem.

Thank you!


Solution

  • MongoDB 3.4 contains the original MMAPv1 storage engine.

    If you want to read MMAP data files created by an another version of MongoDB you can. Start up a new instance of mongod with the following snippet.

    mongod --storageEngine mmapv1