diff --git a/cmd/backup.go b/cmd/backup.go index 83c2348e0..844003a6d 100644 --- a/cmd/backup.go +++ b/cmd/backup.go @@ -32,7 +32,7 @@ func runBackupRawCommand(command *cobra.Command, cmdName string) error { func NewBackupCommand() *cobra.Command { command := &cobra.Command{ Use: "backup", - Short: "backup a TiDB cluster", + Short: "backup a TiDB/TiKV cluster", SilenceUsage: false, PersistentPreRunE: func(c *cobra.Command, args []string) error { if err := Init(c); err != nil { diff --git a/cmd/restore.go b/cmd/restore.go index 948ffdc3c..0b2792a25 100644 --- a/cmd/restore.go +++ b/cmd/restore.go @@ -23,7 +23,7 @@ func runRestoreCommand(command *cobra.Command, cmdName string) error { func NewRestoreCommand() *cobra.Command { command := &cobra.Command{ Use: "restore", - Short: "restore a TiKV cluster from a backup", + Short: "restore a TiDB/TiKV cluster", SilenceUsage: false, PersistentPreRunE: func(c *cobra.Command, args []string) error { if err := Init(c); err != nil { diff --git a/pkg/conn/conn.go b/pkg/conn/conn.go index 87d2e9580..4e38a0499 100644 --- a/pkg/conn/conn.go +++ b/pkg/conn/conn.go @@ -162,7 +162,7 @@ func NewMgr( return nil, errors.Errorf("tikv cluster not health %+v", stores) } - dom, err := g.BootstrapSession(storage) + dom, err := g.GetDomain(storage) if err != nil { return nil, errors.Trace(err) } diff --git a/pkg/glue/glue.go b/pkg/glue/glue.go index 5d5281335..e2016732d 100644 --- a/pkg/glue/glue.go +++ b/pkg/glue/glue.go @@ -14,7 +14,7 @@ import ( // Glue is an abstraction of TiDB function calls used in BR. type Glue interface { - BootstrapSession(store kv.Storage) (*domain.Domain, error) + GetDomain(store kv.Storage) (*domain.Domain, error) CreateSession(store kv.Storage) (Session, error) Open(path string, option pd.SecurityOption) (kv.Storage, error) diff --git a/pkg/gluetidb/glue.go b/pkg/gluetidb/glue.go index da14459dd..aa96c145f 100644 --- a/pkg/gluetidb/glue.go +++ b/pkg/gluetidb/glue.go @@ -26,9 +26,9 @@ type tidbSession struct { se session.Session } -// BootstrapSession implements glue.Glue -func (Glue) BootstrapSession(store kv.Storage) (*domain.Domain, error) { - return session.BootstrapSession(store) +// GetDomain implements glue.Glue +func (Glue) GetDomain(store kv.Storage) (*domain.Domain, error) { + return session.GetDomain(store) } // CreateSession implements glue.Glue diff --git a/pkg/utils/progress.go b/pkg/utils/progress.go index 3ed147f0a..da6b20364 100644 --- a/pkg/utils/progress.go +++ b/pkg/utils/progress.go @@ -57,7 +57,7 @@ func (pp *ProgressPrinter) goPrintProgress( bar.Set(pb.Color, true) bar.SetWriter(&wrappedWriter{name: pp.name}) } else { - tmpl := `{{string . "barName" | red}} {{ bar . "<" "-" (cycle . "-" "\\" "|" "/" ) "." ">"}} {{percent .}}` + tmpl := `{{string . "barName" | green}} {{ bar . "<" "-" (cycle . "-" "\\" "|" "/" ) "." ">"}} {{percent .}}` bar = pb.ProgressBarTemplate(tmpl).Start64(pp.total) bar.Set("barName", pp.name) }