Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-429

incorrect documentation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • # Replies:
      3
    • Last comment by Customer:
      true

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

        Attachments

          Activity

            People

            Assignee:
            sam.kleinman Sam Kleinman (Inactive)
            Reporter:
            mwaschkowski Mark Waschkowski
            Participants:
            Last commenter:
            Jonathan Dahl
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since reply:
              8 years, 22 weeks, 4 days ago
              Date of 1st Reply: