diff --git a/pkg/executor/kopia/kopiabackup.go b/pkg/executor/kopia/kopiabackup.go index e73ba47c7..83355e131 100644 --- a/pkg/executor/kopia/kopiabackup.go +++ b/pkg/executor/kopia/kopiabackup.go @@ -636,7 +636,7 @@ func isRepositoryExists(repository *executor.Repository) (bool, error) { exists, repoExistsError = bucket.Exists(context.TODO(), kopiaRepositoryFile) if repoExistsError != nil { status := &executor.Status{ - LastKnownError: err, + LastKnownError: repoExistsError, } if err = executor.WriteVolumeBackupStatus(status, volumeBackupName, bkpNamespace); err != nil { errMsg := fmt.Sprintf("failed to write a VolumeBackup status: %v", err)