Mongorestore of a db causing me trouble

前端 未结 6 833
猫巷女王i
猫巷女王i 2020-12-29 19:26

I\'m new to MongoDB and I have hard time to backup my local DB and restore it on my server. I found the link on Mongo\'s website : http://www.mongodb.org/display/DOCS/Import

6条回答
  •  無奈伤痛
    2020-12-29 19:34

    I think your folder structure may be getting messed up when you try to move it. For instance, this works for me:

    $ ./mongodump --db Gen
    $ ./mongorestore --db Gen --drop dump/Gen/
    

    Can you try not moving the dump directory, and restoring from /bin/dump/Gen?

    The directory you specify should have .bson files in it, e.g.,

    $ ls /bin/dump/Gen
    foo.bson  bar.bson  baz.bson
    

提交回复
热议问题