Unable to Check or Prune

#1

Hi,
I’m using wit good success Restic for creating the backup of my customers data.
Today I found this log in my backup unit

Dec 17 09:13:44 bastion-0 bash[1771]: counting files in repo
Dec 17 09:13:46 bastion-0 bash[1771]: building new index for repo
Dec 17 09:19:13 bastion-0 bash[1771]: [5:26] 100.00%  15389 / 15389 packs
Dec 17 09:19:13 bastion-0 bash[1771]: repository contains 15389 packs (1506781 blobs) with 70.935 GiB
Dec 17 09:19:14 bastion-0 bash[1771]: processed 1506781 blobs: 0 duplicate blobs, 0B duplicate
Dec 17 09:19:14 bastion-0 bash[1771]: load all snapshots
Dec 17 09:19:14 bastion-0 bash[1771]: find data that is still in use for 40 snapshots
Dec 17 09:21:05 bastion-0 bash[1771]: tree 285e9d846ff4d4ba7ef2cb36cc25f32d651fa4fcd62138d0ac0dc032ba10989e not found in repository
Dec 17 09:21:05 bastion-0 bash[1771]: github.com/restic/restic/internal/repository.(*Repository).LoadTree
Dec 17 09:21:05 bastion-0 bash[1771]:         /restic/internal/repository/repository.go:654
Dec 17 09:21:05 bastion-0 bash[1771]: github.com/restic/restic/internal/restic.FindUsedBlobs
Dec 17 09:21:05 bastion-0 bash[1771]:         /restic/internal/restic/find.go:11
Dec 17 09:21:05 bastion-0 bash[1771]: github.com/restic/restic/internal/restic.FindUsedBlobs
Dec 17 09:21:05 bastion-0 bash[1771]:         /restic/internal/restic/find.go:31
Dec 17 09:21:05 bastion-0 bash[1771]: github.com/restic/restic/internal/restic.FindUsedBlobs
Dec 17 09:21:05 bastion-0 bash[1771]:         /restic/internal/restic/find.go:31
Dec 17 09:21:05 bastion-0 bash[1771]: github.com/restic/restic/internal/restic.FindUsedBlobs
Dec 17 09:21:05 bastion-0 bash[1771]:         /restic/internal/restic/find.go:31
Dec 17 09:21:05 bastion-0 bash[1771]: github.com/restic/restic/internal/restic.FindUsedBlobs
Dec 17 09:21:05 bastion-0 bash[1771]:         /restic/internal/restic/find.go:31
Dec 17 09:21:05 bastion-0 bash[1771]: github.com/restic/restic/internal/restic.FindUsedBlobs
Dec 17 09:21:05 bastion-0 bash[1771]:         /restic/internal/restic/find.go:31
Dec 17 09:21:05 bastion-0 bash[1771]: github.com/restic/restic/internal/restic.FindUsedBlobs
Dec 17 09:21:05 bastion-0 bash[1771]:         /restic/internal/restic/find.go:31
Dec 17 09:21:05 bastion-0 bash[1771]: github.com/restic/restic/internal/restic.FindUsedBlobs
Dec 17 09:21:05 bastion-0 bash[1771]:         /restic/internal/restic/find.go:31
Dec 17 09:21:05 bastion-0 bash[1771]: main.pruneRepository
Dec 17 09:21:05 bastion-0 bash[1771]:         /restic/cmd/restic/cmd_prune.go:191
Dec 17 09:21:05 bastion-0 bash[1771]: main.runPrune
Dec 17 09:21:05 bastion-0 bash[1771]:         /restic/cmd/restic/cmd_prune.go:85
Dec 17 09:21:05 bastion-0 bash[1771]: main.glob..func18
Dec 17 09:21:05 bastion-0 bash[1771]:         /restic/cmd/restic/cmd_prune.go:25
Dec 17 09:21:05 bastion-0 bash[1771]: github.com/spf13/cobra.(*Command).execute
Dec 17 09:21:05 bastion-0 bash[1771]:         /restic/vendor/github.com/spf13/cobra/command.go:762
Dec 17 09:21:05 bastion-0 bash[1771]: github.com/spf13/cobra.(*Command).ExecuteC
Dec 17 09:21:05 bastion-0 bash[1771]:         /restic/vendor/github.com/spf13/cobra/command.go:852
Dec 17 09:21:05 bastion-0 bash[1771]: github.com/spf13/cobra.(*Command).Execute
Dec 17 09:21:05 bastion-0 bash[1771]:         /restic/vendor/github.com/spf13/cobra/command.go:800
Dec 17 09:21:05 bastion-0 bash[1771]: main.main
Dec 17 09:21:05 bastion-0 bash[1771]:         /restic/cmd/restic/main.go:86
Dec 17 09:21:05 bastion-0 bash[1771]: runtime.main
Dec 17 09:21:05 bastion-0 bash[1771]:         /usr/local/go/src/runtime/proc.go:201
Dec 17 09:21:05 bastion-0 bash[1771]: runtime.goexit
Dec 17 09:21:05 bastion-0 bash[1771]:         /usr/local/go/src/runtime/asm_amd64.s:1333
Dec 17 09:21:10 bastion-0 bash[1771]: restic prune fail

I’m using restic 0.9.3 for prune.
the snapshot are create wit restic 8.3 o 9

I try to run a restic check but it don’t solve the problem
I have rebuind the index e retry a restic check.
This is the output

restic check
using temporary cache in /tmp/restic-check-cache-853101944
repository f15bb05f opened successfully, password is correct
created new cache in /tmp/restic-check-cache-853101944
create exclusive lock for repository
load indexes
check all packs
check snapshots, trees and blobs
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 607.259129ms: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 767.41903ms: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 1.335887587s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 991.552424ms: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 1.678861405s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 5.020607552s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 2.996486615s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 10.149446338s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 10.267778617s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 27.216141263s: unexpected EOF
error for tree 7bfdff4d:
  unexpected EOF


Fatal: repository contains errors

Now i’m runnig a backup of my data to new container to bring safe the data.
I following the issue Issue 2052

Have you got other suggestions ?

Thaks,
Attilio

#2

What is your backup process? Do you backup locally and then sync the local repository to a remote system, or do you back up directly to a remote system? What is the type of the remote (e.g. S3, Wasabi, B2, GCS, Google Drive, etc.)?

#3

Hi,
I’m sorry i forget to give my details.
I’m using open stack swift in remote.
i try the beta version of restic foun in https://beta.restic.net/restic_recover_linux_amd64.bz2
As decribed in the Issue 2052
But it haven’t solve my problem.
Now I messed up a bit 'of things in this repo, i’m performing a new copy of repo for retry.
Tomorrow I will send the specific log.

Thanks for help.
Regards

#4

here my log

 ./restic check 
using temporary cache in /tmp/restic-check-cache-696309528
repository f15bb05f opened successfully, password is correct
created new cache in /tmp/restic-check-cache-696309528
create exclusive lock for repository
load indexes
check all packs
check snapshots, trees and blobs
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 465.92774ms: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 1.076480905s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 1.255795591s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 2.446767663s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 1.861816779s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 3.029154842s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 4.334150039s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 8.836325294s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 12.796996948s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 9.658794259s: unexpected EOF
error for tree 7bfdff4d:
  unexpected EOF
Fatal: repository contains errors

I try to rebuild the index

restic rebuild-index 
repository f15bb05f opened successfully, password is correct
counting files in repo
[8:16] 100.00%  15438 / 15438 packs
finding old index files
saved new indexes as [ac47a8a7 709f2c40 05e56fdb 01820224 9cd61238 fefe6f22]
remove 6 old index files

End then recover

 ./restic recover
repository f15bb05f opened successfully, password is correct
load index files
load 3384 trees

tree (200/3384)Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 699.664838ms: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 754.439163ms: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 969.536191ms: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 2.422500764s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 2.030644335s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 4.218256024s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 3.459389631s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 10.836154362s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 10.544029235s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 25.347110208s: unexpected EOF
unable to load tree 7bfdff4d: unexpected EOF
tree (3384/3384)
done
found 65 roots
saved new snapshot 606dcb8a

Esit of new check

./restic check 
using temporary cache in /tmp/restic-check-cache-481549461
repository f15bb05f opened successfully, password is correct
created new cache in /tmp/restic-check-cache-481549461
create exclusive lock for repository
load indexes
check all packs
check snapshots, trees and blobs
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 687.932832ms: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 721.559829ms: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 743.590225ms: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 696.125238ms: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 641.17991ms: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 651.007434ms: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 920.159135ms: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 729.102311ms: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 1.016347562s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 440.86346ms: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 504.202451ms: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 722.68688ms: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 1.54780627s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 1.673740557s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 428.468339ms: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 682.055748ms: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 1.061932199s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 1.066252939s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 395.575122ms: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 1.029514713s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 949.503694ms: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 567.82408ms: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 1.792202623s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 2.52078426s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 1.072864124s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 1.400014912s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 649.519857ms: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 1.922548398s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 785.418133ms: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 3.600087489s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 1.81037032s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 2.51200607s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 418.522504ms: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 1.327615013s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 1.193070719s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 282.047879ms: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 1.67815971s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 2.010018385s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 5.228914289s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 2.284104845s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 753.177482ms: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 3.831561254s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 4.875867254s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 3.073836997s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 550.084079ms: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 3.266457402s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 1.457529205s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 1.090375268s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 2.153541696s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 4.214101s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 1.518912399s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 5.945016833s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 1.069544082s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 3.940996477s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 8.490390534s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 6.616526904s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 1.9960896s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 5.659186525s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 6.501954164s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 2.440086633s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 2.204263215s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 4.052125344s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 7.016241741s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 7.878757682s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 3.499492294s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 10.510523504s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 3.4105974s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 12.715089401s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 8.029470566s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 10.431558698s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 4.347179656s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 9.156634411s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 8.245259353s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 8.855581971s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 4.236624614s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 5.386819338s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 18.28824537s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 6.632592408s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 18.781400618s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 6.057160972s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 9.602046487s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 13.501286576s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 13.456076791s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 7.045754505s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 12.308651098s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 14.552804788s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 16.576780181s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 6.595264068s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 18.997620724s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 17.161380371s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 28.556958294s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 16.149306555s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 24.395316432s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 8.129559765s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 10.311825496s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 19.271931936s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 28.171960307s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 21.015042453s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 27.424458217s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 11.52272685s: unexpected EOF
error for tree 7bfdff4d:
 unexpected EOF
Fatal: repository contains errors

I can do other for heal the repo ?

Regards,
Attilio

#5

It looks like as if restic thinks there’s a file in the repository, but it cannot be read properly. The error is always about a file with the name starting with 94dfdc7e2f:

Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 920.159135ms: unexpected EOF

Here, it tries to read 1597384 bytes starting at offset 36105669, and it looks like the file has been truncated. Can you check how large the file in the folder data/94 is?

I’m wondering though: the header (which describes what’s in each file) is located at the end of the file, and if it is truncated, then the header won’t be at the end of the file. But restic rebuild-index reads all headers of all files, so it should have complained that there’s an error with the file… Do you see any errors when running rebuild-index?

When we have found out what went wrong, you can search for snapshots which reference the missing tree object that restic check complained about, like this: restic find --tree 7bfdff4d

Then use restic forget on all the snapshot IDs returned there, then you should have a consistent repository again.

#6

Hi Alexander,
Thanks for your help.
If i run a restic rebuild-index i get this output

 ./restic rebuild-index 
repository f15bb05f opened successfully, password is correct
created new cache in /tmp/restic_cache/restic
counting files in repo
[9:10] 100.00%  15439 / 15439 packs
finding old index files
saved new indexes as [3a2223f1 4dcda7e6 dff1522b 5952def6 9352d827 671e5077]
remove 7 old index files

at the moment i can’t find the corrupted snap

restic find --tree 7bfdff4d
repository f15bb05f opened successfully, password is correct
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 269.368879ms: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 577.973296ms: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 994.383832ms: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 990.516144ms: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 3.198691938s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 3.028033288s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 6.350542351s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 6.594601685s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 11.872817161s: unexpected EOF
Load(<data/94dfdc7e2f>, 36105669, 1597384) returned error, retrying after 16.537369182s: unexpected EOF
unexpected EOF
#7

Hmm, it appears that restic find gives up when it encounters an error. @fd0 maybe it would make sense to have a flag that allows it to skip objects that it can’t read?

However, if this pack is damaged and the tree that contains tree 7bfdff4d is in the same pack, then we might be SOL…

Repository damaged after accidentally deleting data files
#8

Indeed, that’s a bug. When I find some time in the next couple of days I can add that, the repo can be repaired.

#9

Hi,
Same news about this topic ?

split this topic #10

2 posts were split to a new topic: Repository damaged after accidentally deleting data files

#11

I’ve submitted the issue for tracking.

1 Like
#12

I have a PR that fixes restic find aborting when a tree can’t be loaded. Instead it will show you the tree ID and the snapshot it’s looking in, the implication being that if you forget the snapshot, the tree isn’t needed anymore.

If you want to test it to try to fix your repository, you can build this branch: https://github.com/cdhowie/restic/tree/issue-2224

1 Like
#13

This fix is now in the newly-released 0.9.5.

1 Like