{"record":{"id":"4df37700de47d1cb","repo":"kopia/kopia","slug":"no-snapshots-for-v","errorCode":null,"errorMessage":"no snapshots for %v","messagePattern":"no snapshots for (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/command_snapshot_fix.go","lineNumber":187,"sourceCode":"\nfunc (c *commonRewriteSnapshots) listManifestIDs(ctx context.Context, rep repo.Repository) ([]manifest.ID, error) {\n\tmanifests := toManifestIDs(c.manifestIDs)\n\n\tfor _, src := range c.sources {\n\t\tlog(ctx).Infof(\"Listing snapshots for source %q...\", src)\n\n\t\tsi, err := snapshot.ParseSourceInfo(src, rep.ClientOptions().Hostname, rep.ClientOptions().Username)\n\t\tif err != nil {\n\t\t\treturn nil, errors.Wrap(err, \"unable to parse source\")\n\t\t}\n\n\t\tm, err := snapshot.ListSnapshotManifests(ctx, rep, &si, nil)\n\t\tif err != nil {\n\t\t\treturn nil, errors.Wrap(err, \"unable to list manifests\")\n\t\t}\n\n\t\tif len(m) == 0 {\n\t\t\treturn nil, errors.Errorf(\"no snapshots for %v\", src)\n\t\t}\n\n\t\tmanifests = append(manifests, m...)\n\t}\n\n\tif len(manifests) == 0 {\n\t\tlog(ctx).Info(\"Listing all snapshots...\")\n\n\t\tm, err := snapshot.ListSnapshotManifests(ctx, rep, nil, nil)\n\t\tif err != nil {\n\t\t\treturn nil, errors.Wrap(err, \"unable to list snapshot manifests\")\n\t\t}\n\n\t\tmanifests = append(manifests, m...)\n\t}\n\n\treturn manifests, nil\n}","sourceCodeStart":169,"sourceCodeEnd":205,"githubUrl":"https://github.com/kopia/kopia/blob/82495e54b584c1ef6073c9e1be048f57f8aef078/cli/command_snapshot_fix.go#L169-L205","documentation":"In kopia's snapshot-fix command, listManifestIDs fails with this error when snapshot.ListSnapshotManifests returns zero manifests for the explicitly requested source (user@host:path). The tool refuses to proceed because a rewrite pass has nothing to operate on. It is an errors.Errorf (not a wrap), so the underlying cause is simply an empty manifest set for the given source.","triggerScenarios":"Running `kopia snapshot fix ...` with a --source or path argument that matches a snapshot source which has no snapshot manifests in the repository (e.g. wrong hostname/username/path spelling).","commonSituations":"Typo in the source string; snapshots were deleted or the source was never backed up; querying a different host's snapshots than intended; case sensitivity in username/hostname.","solutions":["Run `kopia snapshot list` (without source filter) to see the exact source identifiers available and correct the source string.","Verify the hostname/username components match what kopia recorded (use `kopia snapshot list --all`).","If no snapshots exist, take a snapshot first with `kopia snapshot create`."],"exampleFix":"// before\nkopia snapshot fix remove-files --remove-files 'tmp/*' myhost@user:/wrong/path\n// after\nkopia snapshot list --all  # confirm exact source\nkopia snapshot fix remove-files --remove-files 'tmp/*' myhost@user:/correct/path","handlingStrategy":"validation","validationCode":"sources, _ := snapshot.ListSnapshotManifests(ctx, rep, nil, nil)\n// confirm the exact source exists before filtering:\nif len(sources) == 0 { return errors.New(\"repository has no snapshots\") }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy exact source identifiers from `kopia snapshot list --all`.","Verify snapshots exist for the source before running snapshot fix."],"tags":["cli","snapshot","empty-result-set"],"backgroundTag":"empty-result-set","analyzedSha":"82495e54b584c1ef6073c9e1be048f57f8aef078","analyzedAt":"2026-09-07T20:35:21.689Z","contentChangedAt":"2026-09-07T20:35:21.689Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}