mongodb,mongodump,mongorestore
You need to include the path of the source db dump directory to restore from (as at MongoDB 2.6). For example, if restoring from "twitter" to "some_destination_db" your command line would be similar to: mongorestore --port xxxxx --db some_destination_db dump/twitter ...
So the issue ended up being that the user I was trying to do the restore with only had the read and dbAdmin roles. I had made a separate user so that the regular user used by the application did not have administrative rights. After changing my user's role from...
mongodb,mongodump,mongorestore
First, does mongodump produce any other critical data besides collection names and indexes (when dumping a specific database) and if it does what is it? mongodump produces a binary backup of your data, including the specific BSON types that are used for fields. Additional metadata exported includes collection options...
mongodb,mongodump,mongorestore
Read the documentation relevant to your versions first, backup, make sure the solution below is relevant to your scenario etc. http://docs.mongodb.org/v2.4/reference/program/mongodump/ http://docs.mongodb.org/v2.4/reference/program/mongorestore/ SSH In rhc ssh [app-name] cd app-root/repo/ Check what version of mongodump you have: mongodump --version mongodump version 2.4.9 mongodump Replace the environment variables below with their actual...
I think this is to do with the _id_ index. Try deleting or renaming this, then doing another mongodump and see if that works. I had a similar issue once and it was to do with an index. I can't remember if I deleted the index or renamed it. So...
It seems there is no need for complicated script. You can just do: mongorestore <dbname> --drop in /dump directory to automatically restore all collections...
mongodb,mongodump,mongorestore
I believe it's the opposite issue - you cannot specify a database when using the oplog option. The code you found: if (mongoRestoreGlobalParams.oplogReplay) { // fail early if errors if (toolGlobalParams.db != "") { toolError() << "Can only replay oplog on full restore" << std::endl; return -1; } triggers when...
mongodb,mongodump,mongorestore
It sounds like you have backed up a database that was corrupt to start with. Try running mongorestore with the --noobjcheck option. Hope this helps.