kopia/kopia · error
no logs found
Error message
no logs found
What it means
Raised by the logs-show command after all filtering (log criteria and any explicitly listed session IDs) leaves zero log sessions, meaning the repository contains no upload log sessions matching the request, so there is nothing to display.
Solutions
- Run 'kopia logs list' to see which log sessions actually exist
- Drop or widen filters (remove --log-session-id, use a broader --since)
- Confirm logs exist in this repository rather than a different one
- Enable debug log uploads if sessions are missing
Example fix
// before kopia logs show --log-session-id abc123 // after kopia logs list # find a valid session ID first kopia logs show --log-session-id <valid-id>
Defensive patterns
Strategy: fallback
Validate before calling
SESSIONS=$(kopia logs list); if [ -z "$SESSIONS" ]; then echo "no logs in repo"; fi
Try / catch
out, err := cmd.Output(); if err != nil && strings.Contains(err.Error(), "no logs found") { // notify user, skip log display } Prevention
- List sessions before showing one
- Avoid overly narrow session ID/since filters
- Ensure log uploads are enabled
When it happens
Trigger: Running 'kopia logs show' when the repository contains no log sessions, or with --log-session-id / --since-style filters that exclude all sessions.
Common situations: Requesting a specific log session ID that was deleted or typo'd; logs never uploaded to the repo; filters like 'last-week' on a repo with only older logs.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- error decrypting log
- error expiring logs
- error getting log
- error getting log sessions
- error listing logs
AI-assisted analysis of kopia/kopia@82495e54b5 (2026-09-07).
Data as JSON: /api/errors/eb67abbc3aa36035.
Report an issue: GitHub.
Appendix: source
Thrown at cli/command_logs_show.go:47
c.out.setup(svc)
}
func (c *commandLogsShow) run(ctx context.Context, rep repo.DirectRepository) error {
sessions, err := getLogSessions(ctx, rep.BlobReader())
if err != nil {
return err
}
sessions = c.crit.filterLogSessions(sessions)
if len(c.logSessionIDs) > 0 {
sessions = filterLogSessions(sessions, func(l *logSessionInfo) bool {
return slices.Contains(c.logSessionIDs, l.id)
})
}
if len(sessions) == 0 {
return errors.New("no logs found")
}
// by default show latest one
if !c.crit.any() {
sessions = sessions[len(sessions)-1:]
log(ctx).Infof("Showing the latest log (%v)", formatTimestamp(sessions[0].startTime))
}
var data gather.WriteBuffer
defer data.Close()
var decrypted gather.WriteBuffer
defer decrypted.Close()
for _, s := range sessions {
for _, bm := range s.segments {
if err := rep.BlobReader().GetBlob(ctx, bm.BlobID, 0, -1, &data); err != nil {
return errors.Wrap(err, "error getting log")View on GitHub (pinned to 82495e54b5)