[DOCS-429] incorrect documentation Created: 21/Aug/12  Updated: 08/Sep/12  Resolved: 21/Aug/12

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Mark Waschkowski Assignee: Sam Kleinman (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 11 years, 26 weeks, 1 day ago

 Description   

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.'

to read:

'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)'

for clarity.

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."



 Comments   
Comment by Mark Waschkowski [ 22/Aug/12 ]

Hi Sam,

OK, no probs, was just feeling a bit frustrated at that moment.

Thank you for fixing it up, and glad I could help. I'll try to keep my eyes open for other issues as well.

Best,

Mark

Comment by Sam Kleinman (Inactive) [ 21/Aug/12 ]

I'm very sorry about this error, and want to thank you for catching it. I've made the changes you suggested, and the page reflects these changes.

I'm going to go ahead and resolve this case, but if you see any additional errors on this or another issue, feel free open another ticket or reopen this ticket.

Regards,
sam

Comment by auto [ 21/Aug/12 ]

Author:

{u'date': u'2012-08-21T14:11:38-07:00', u'email': u'samk@10gen.com', u'name': u'Sam Kleinman'}

Message: DOCS-429 correction to mongorestore document
Branch: master
https://github.com/mongodb/docs/commit/bf412f61f169eece8e9947b9b7680b1a38711eb0

Generated at Thu Feb 08 07:38:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.