kopia/kopia · error

unable to find snapshot manifests

Error message

unable to find snapshot manifests

What it means

snapshot.ListSnapshotManifests builds labels from a SourceInfo (optional) plus tags, then calls rep.FindManifests. A storage-level failure from FindManifests is wrapped with "unable to find snapshot manifests". An empty result is not an error - only actual enumeration failures produce this.

Solutions

  1. Check the wrapped error for the underlying storage cause.
  2. Retry the listing operation after transient backend failures.
  3. Verify repository health and rebuild indexes if corrupted (`kopia repository repair-index`).
Defensive patterns

Strategy: retry

Validate before calling

if err := rep.Refresh(ctx); err != nil {
    return fmt.Errorf("cannot access repository manifests: %w", err)
}

Try / catch

ids, err := snapshot.ListSnapshotManifests(ctx, rep, si, tags)
if err != nil {
    return fmt.Errorf("manifest enumeration failed: %w", err) // empty result is err==nil, len==0
}

Prevention

When it happens

Trigger: Calling snapshot.ListSnapshotManifests(ctx, rep, si, tags) when the manifest query fails at the storage layer (backend errors, corrupted index, unreachable repository).

Common situations: Maintenance tasks (snapshot delete, GC listing) hitting transient object-store errors; repository index inconsistency; connecting to a partially synchronized repository replica.

Understand the failure class

Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.

Related errors


AI-assisted analysis of kopia/kopia@82495e54b5 (2026-09-07). Data as JSON: /api/errors/6cf611a4e1b0b0d6. Report an issue: GitHub.

Appendix: source

Thrown at snapshot/manager.go:203

	return successful, nil
}

// ListSnapshotManifests returns the list of snapshot manifests for a given source or all sources if nil.
func ListSnapshotManifests(ctx context.Context, rep repo.Repository, src *SourceInfo, tags map[string]string) ([]manifest.ID, error) {
	labels := map[string]string{
		typeKey: ManifestType,
	}

	if src != nil {
		labels = sourceInfoToLabels(*src)
	}

	maps.Copy(labels, tags)

	entries, err := rep.FindManifests(ctx, labels)
	if err != nil {
		return nil, errors.Wrap(err, "unable to find snapshot manifests")
	}

	return entryIDs(entries), nil
}

// FindSnapshotsByRootObjectID returns the list of matching snapshots for a given rootID.
func FindSnapshotsByRootObjectID(ctx context.Context, rep repo.Repository, rootID object.ID) ([]*Manifest, error) {
	ids, err := ListSnapshotManifests(ctx, rep, nil, nil)
	if err != nil {
		return nil, errors.Wrap(err, "error listing snapshot manifests")
	}

	manifests, err := LoadSnapshots(ctx, rep, ids)
	if err != nil {
		return nil, errors.Wrap(err, "error loading snapshot manifests")
	}

	var result []*Manifest

View on GitHub (pinned to 82495e54b5)