Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-2363

Update warning message for "mongorestore"

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 100.1.0
    • Affects Version/s: None
    • Component/s: mongorestore
    • Not Needed

      Hi there,

      Two things have been causing little frustration to some users regarding the following "mongorestore" warning message:

      the --db and --collection args should only be used when restoring from a BSON file. Other uses are deprecated and will not exist in the future; use --nsInclude instead

      1. Some users have been confused by the warning after using "mongorestore" with the "–db" option. The confusion comes from the first sentence because they were actually restoring from BSON files. Could we remove this sentence: the --db and --collection args should only be used when restoring from a BSON file?
      2. The warning message could be more precise if a user is trying to rename a database. As this comment reports, they are trying to rename a db but the warning is misleading because it tells them to use "—nsinclude" when they should be told to use "—nsInclude", "—nsFrom" and "—nsTo" in order to rename a database.  

      Warning message also reported on Stackoverflow

      Thanks!
      Carl

      cc: kelsey.schubert

            Assignee:
            hari.amoor@mongodb.com Hari Amoor (Inactive)
            Reporter:
            carl.champain@mongodb.com Carl Champain (Inactive)
            Huan Li (Inactive), Matthew Chiaravalloti
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: