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

mongorestore without arguments should only display usage

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

      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.

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

              Created:
              Updated:
              Resolved: