Windows 10 and MongoDB 3.2
I have 2 files. One with .ns extension and one with. They are both in c:\data\dump
I am trying to run
mongorestore -d gnome c:\data\dump
However all I get is
2015-12-11T23:14:12.860+0000 building a list of collections to restore from c:\data\dump dir
2015-12-11T23:14:12.862+0000 don't know what to do with file "c:\data\dump\gnome.0", skipping...
2015-12-11T23:14:12.862+0000 don't know what to do with file "c:\data\dump\gnome.ns", skipping...
2015-12-11T23:14:12.863+0000 done
Any advice?
Best Answer
The
.ns
file is the file in which MongoDB stores the namespaces of a database. So most likely, what you have is not a dump, but a copy of the datafiles of a single database. Note that this most likely is only a partial copy of a MongoDB instance.Here is what to do in case you already have an instance of MongoDB running.
dbpath
pointing to the directory with those files.In case you do not have any instance running yet, simply start MongoDB with
dbpath
pointing to the directory with the data files or copy the datafiles into yourdbpath
.