-
Type: Task
-
Resolution: Won't Fix
-
Priority: 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.