Priority: Major - P3
Affects Version/s: None
Fix Version/s: None
Last comment by Customer:true
Ugh, its just not right and misleading.
1) there is no --database parameter listed
2) -db creates a new database to put data into, NOTHING TO DO WITH where the data is coming from
I just tested it after re-reading about 10 times and then searching on the web and finding conflicting statements.
The following statement:
mongorestore -db baDevJuly25 ./dump/buildingAssessment
restores the data from ./dump/buildingAssessment to a new database called baDevJuly25, as specified by the -db parameter.
I would recommend changing:
'Use the --db option to specify a database for mongorestore to restore data.'
'Use the --db option to specify a database for mongorestore to restore data into. If the database doesn't exist, one will be created. If it does exist, then the normal import insert rules apply (see xyz)'
Original Link: http://docs.mongodb.org/manual/reference/mongorestore/
"Consider the following example:
mongorestore --collection people --database accounts
Here, mongorestore reads the database dump in the dump/ sub-directory of the current directory, and restores only the documents in the collection named people from the database named accounts. mongorestore restores data to the instance running on the localhost interface on port 27017."