Mongorestore of a db causing me trouble

前端 未结 6 839
猫巷女王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:58

    An additional note for whoever doesn't want to be annoyed by the error "root directory must be a dump of a single database when specifying a db name with --db"

    When specifying --db and without --collection (restoring a whole database): - the given path must be a directory path - the directory must not contain any other files than .bson or .json. It took me a while to realize that the hidden .svn folder (if you use SVN) will mess up the script

提交回复
热议问题