diff --git a/cmd/restic/cmd_find.go b/cmd/restic/cmd_find.go index f7b9e4c73..0986b5a13 100644 --- a/cmd/restic/cmd_find.go +++ b/cmd/restic/cmd_find.go @@ -394,7 +394,6 @@ func (f *Finder) findIDs(ctx context.Context, sn *restic.Snapshot) error { delete(f.blobIDs, idStr[:shortStr]) } f.out.PrintObject("blob", idStr, nodepath, parentTreeID.String(), sn) - break } } diff --git a/cmd/restic/cmd_prune.go b/cmd/restic/cmd_prune.go index b932bafee..bf64401b4 100644 --- a/cmd/restic/cmd_prune.go +++ b/cmd/restic/cmd_prune.go @@ -245,8 +245,9 @@ func prune(opts PruneOptions, gopts GlobalOptions, repo restic.Repository, usedB // Check if all used blobs have been found in index if len(usedBlobs) != 0 { - Warnf("%v not found in the index\n"+ - "Data blobs seem to be missing, aborting prune to prevent further data loss!\n"+ + Warnf("%v not found in the index\n\n"+ + "Integrity check failed: Data seems to be missing.\n"+ + "Will not start prune to prevent (additional) data loss!\n"+ "Please report this error (along with the output of the 'prune' run) at\n"+ "https://github.com/restic/restic/issues/new/choose", usedBlobs) return errorIndexIncomplete @@ -378,7 +379,10 @@ func prune(opts PruneOptions, gopts GlobalOptions, repo restic.Repository, usedB return errorPacksMissing } if len(ignorePacks) != 0 { - Verbosef("missing but unneded pack files are referenced in the index, will be repaired\n") + Warnf("Missing but unneeded pack files are referenced in the index, will be repaired\n") + for id := range ignorePacks { + Warnf("will forget missing pack file %v\n", id) + } } repackAllPacksWithDuplicates := true diff --git a/cmd/restic/cmd_rebuild_index.go b/cmd/restic/cmd_rebuild_index.go index 3af5af29e..2ac7b2613 100644 --- a/cmd/restic/cmd_rebuild_index.go +++ b/cmd/restic/cmd_rebuild_index.go @@ -88,6 +88,11 @@ func rebuildIndex(opts RebuildIndexOptions, gopts GlobalOptions, repo *repositor packSizeFromList[id] = packSize removePacks.Insert(id) } + if !ok { + Warnf("adding pack file to index %v\n", id) + } else if size != packSize { + Warnf("reindexing pack file %v with unexpected size %v instead of %v\n", id, packSize, size) + } delete(packSizeFromIndex, id) return nil }) @@ -98,6 +103,7 @@ func rebuildIndex(opts RebuildIndexOptions, gopts GlobalOptions, repo *repositor // forget pack files that are referenced in the index but do not exist // when rebuilding the index removePacks.Insert(id) + Warnf("removing not found pack file %v\n", id) } if len(packSizeFromList) > 0 {