Restore a mongo DB from a compose.io backup?
The .ns .0 .1 etc. files are the data files themselves.
This the raw db you can mongodump
those files and then mongorestore as always:
This solution would work pre mongo 3.0, but --dbpath is no longer supported by mongodump
.
Mongo 3.0 Solution:
- Run
mongod --dbpath ./
from the directory with the extracted download with the.ns
files. - Run
mongodump -d [DBNAME] -o [DIR TO DUMP TO]
...options are not required. - Proceed with a mongorestore as normal