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

incorrect documentation

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

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

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

              Created:
              Updated:
              Resolved:
              11 years, 37 weeks, 2 days ago