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

br:backup: If make a backup of empty db, should get a success summary #27467

Merged
merged 9 commits into from
Aug 24, 2021
7 changes: 6 additions & 1 deletion br/pkg/task/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,12 @@ func RunBackup(c context.Context, g glue.Glue, cmdName string, cfg *BackupConfig
pdAddress := strings.Join(cfg.PD, ",")
log.Warn("Nothing to backup, maybe connected to cluster for restoring",
zap.String("PD address", pdAddress))
return metawriter.FlushBackupMeta(ctx)

err = metawriter.FlushBackupMeta(ctx)
if err == nil {
summary.SetSuccessStatus(true)
}
return err
}

if isIncrementalBackup {
Expand Down