If you download a compose.io backup of a mongodb instance and uncompress the .tar file you end up with .ns
and extensions that are single digits. How do you restore the db from these?
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
.
mongod --dbpath ./
from the directory with the extracted download with the .ns
files.mongodump -d [DBNAME] -o [DIR TO DUMP TO]
...options are not required.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With