diff --git a/cmd/dump.go b/cmd/dump.go index 856d5db0..5d3d2f92 100644 --- a/cmd/dump.go +++ b/cmd/dump.go @@ -181,6 +181,8 @@ func dumpCmd(execs execs, cmdConfig *cmdConfiguration) (*cobra.Command, error) { prune = execs.prune timer = execs.timer } + // at this point, any errors should not have usage + cmd.SilenceUsage = true if err := timer(timerOpts, func() error { err := dump(dumpOpts) if err != nil { diff --git a/cmd/restore.go b/cmd/restore.go index 12c1b14a..1334b481 100644 --- a/cmd/restore.go +++ b/cmd/restore.go @@ -98,6 +98,8 @@ func restoreCmd(execs execs, cmdConfig *cmdConfiguration) (*cobra.Command, error if execs != nil { restore = execs.restore } + // at this point, any errors should not have usage + cmd.SilenceUsage = true if err := restore(store, targetFile, cmdConfig.dbconn, databasesMap, compressor); err != nil { return fmt.Errorf("error restoring: %v", err) }