diff --git a/core/backup_impl_create_backup.go b/core/backup_impl_create_backup.go index ae95fabf..537f6b7f 100644 --- a/core/backup_impl_create_backup.go +++ b/core/backup_impl_create_backup.go @@ -649,6 +649,9 @@ func (b *BackupContext) executeCreateBackup(ctx context.Context, request *backup b.mu.Lock() defer b.mu.Unlock() + // set backup state + b.meta.UpdateBackup(backupInfo.Id, setStateCode(backuppb.BackupTaskStateCode_BACKUP_EXECUTING)) + // pause GC if request.GetGcPauseEnable() || b.params.BackupCfg.GcPauseEnable { var pause = 0 diff --git a/core/backup_meta_manager.go b/core/backup_meta_manager.go index 07a50c34..3d7e9c15 100644 --- a/core/backup_meta_manager.go +++ b/core/backup_meta_manager.go @@ -492,7 +492,7 @@ func (meta *MetaManager) GetFullMeta(id string) *backuppb.BackupInfo { } else { cloneBackup.Progress = 100 } - log.Info("Get backup progress", zap.Int64("backupedSize", backupedSize), zap.Int64("totalSize", totalSize), zap.Int32("progress", cloneBackup.Progress)) + log.Info("Get backup", zap.String("state", cloneBackup.StateCode.String()), zap.Int64("backupedSize", backupedSize), zap.Int64("totalSize", totalSize), zap.Int32("progress", cloneBackup.Progress)) return cloneBackup }