diff --git a/etcdctl/ctlv3/command/snapshot_command.go b/etcdctl/ctlv3/command/snapshot_command.go index b55df8095..586344384 100644 --- a/etcdctl/ctlv3/command/snapshot_command.go +++ b/etcdctl/ctlv3/command/snapshot_command.go @@ -297,6 +297,10 @@ type dbstatus struct { } func dbStatus(p string) dbstatus { + if _, err := os.Stat(p); err != nil { + ExitWithError(ExitError, err) + } + ds := dbstatus{} db, err := bolt.Open(p, 0600, nil)