Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the config error in restore (#2250) #2282

Merged
merged 12 commits into from
Apr 24, 2020
4 changes: 3 additions & 1 deletion cmd/backup-manager/app/import/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,17 @@ func (ro *Options) loadTidbClusterData(restorePath string) error {
if exist := util.IsDirExist(restorePath); !exist {
return fmt.Errorf("dir %s does not exist or is not a dir", restorePath)
}
// args for restore
args := []string{
"--status-addr=0.0.0.0:8289",
"--backend=tidb",
"--server-mode=false",
"-log-file=",
"--log-file=",
fmt.Sprintf("--tidb-user=%s", ro.User),
fmt.Sprintf("--tidb-password=%s", ro.Password),
fmt.Sprintf("--tidb-host=%s", ro.Host),
fmt.Sprintf("--d=%s", restorePath),
fmt.Sprintf("--tidb-port=%d", ro.Port),
}

output, err := exec.Command("/tidb-lightning", args...).CombinedOutput()
Expand Down