0

I am not able to get the correct command to issue in order to restore a mongodb from a dump dir.
Any idea what is wrong and how to fix it? Thanks

appParent$ ls
dir1 dir2 dump

appParent$ ls dump/
meteor

appParent$ mongorestore --maintainInsertionOrder -h 127.0.0.1 --port 3001 -d meteor

error:

using default 'dump' directory
building a list of collections to restore from dump dir
don't know what to do with subdirectory "dump/meteor", skipping...
done

2 Answers 2

1

Apart from the -d (database) parameter I think you may need to explicitly send the final path argument

So the command would be (considering you are in the folder containing the dump folder):

$ mongorestore --maintainInsertionOrder -h 127.0.0.1 --port 3001 -d meteor dump/meteor

1
  • When I do that, I get "don't know what to do with subdirectory "dump/meteor/dbais2", skipping..."
    – Fred J.
    Sep 23, 2016 at 2:18
0

If the directory name is the default you don't need further arguments. Just run mongorestore.

appParent$ ls
dir1 dir2 dump

appParent$ mongorestore --port 3001
1
  • That still gives the same error I mentioned in the comments to Fabio's answer
    – Fred J.
    Sep 23, 2016 at 20:44

Your Answer

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

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