From 7b8886c052716407980fcbda8f4428ba107a6f36 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Thu, 28 Jan 2021 21:42:26 +0100 Subject: [PATCH] prune: report missing but unneeded pack files This indicates a damaged repository so add some output to help with debugging. --- cmd/restic/cmd_prune.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/restic/cmd_prune.go b/cmd/restic/cmd_prune.go index 777cf616b..19cd4c525 100644 --- a/cmd/restic/cmd_prune.go +++ b/cmd/restic/cmd_prune.go @@ -378,7 +378,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