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

mongorestore without arguments should only display usage

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: mongorestore
    • Labels:

      Description

      Most CLI tools that are potentially destructive require arguments to make them do anything, and when run with no arguments they just display an error or a usage summary. mongorestore should respect this convention.

      Why? Perhaps I am the only person that will ever do this (or not), but imagine the following scenario: User creates a dump that goes in the default directory. User is writing a shell script months later and wants to read the usage summary of the mongorestore command and types "mongorestore", forgetting that without arguments actually starts a restore.. Now any data deleted since the dump was created is unintentionally restored..

      Yes, the user made a mistake and should have typed "mongorestore --help", but don't you think having mongorestore with no arguments start restoring potentially very old database dumps is a bad idea? From a usability perspective requiring the user to type "mongorestore dump" is really not a big deal.

        Attachments

          Activity

            People

            Assignee:
            backlog-server-platform Backlog - Platform Team
            Reporter:
            colinmollenhour Colin Mollenhour
            Votes:
            4 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: