diff --git a/pkg/service/backup/service.go b/pkg/service/backup/service.go index 0533fe1a02..481986e56c 100644 --- a/pkg/service/backup/service.go +++ b/pkg/service/backup/service.go @@ -786,6 +786,7 @@ func (s *Service) Backup(ctx context.Context, clusterID, taskID, runID uuid.UUID Config: s.config, Client: client, }, + PrevStage: run.Stage, Metrics: s.metrics, Units: run.Units, OnRunProgress: s.putRunProgressLogError, diff --git a/pkg/service/backup/worker.go b/pkg/service/backup/worker.go index d7c49b4e39..cdede6daeb 100644 --- a/pkg/service/backup/worker.go +++ b/pkg/service/backup/worker.go @@ -64,6 +64,7 @@ type workerTools struct { type worker struct { workerTools + PrevStage Stage Metrics metrics.BackupMetrics Units []Unit Schema *bytes.Buffer diff --git a/pkg/service/backup/worker_index.go b/pkg/service/backup/worker_index.go index 9fa5d18bde..ab8d3322c2 100644 --- a/pkg/service/backup/worker_index.go +++ b/pkg/service/backup/worker_index.go @@ -147,7 +147,9 @@ func (w *worker) indexSnapshotDirs(ctx context.Context, h hostInfo) ([]snapshotD } } - if len(dirs) == 0 { + // In case of reindexing, it's possible that all snapshot dirs + // were already uploaded and deleted in the previous run (#3733). + if w.PrevStage != StageUpload && len(dirs) == 0 { return nil, errors.New("could not find any files") }