Restic check errors with B2 and a huge repo- what's next?

When running restic check I get several errors. I am using Backblaze as the back-end and my repo is about 110TB and there are about 2.9M source files. I am unsure on how to correct the errors, or find which files are affected. Any thoughts?

How heavy is the “rebuild-index”? There is very little documentation about what it actually does, and when to use it or risk associated with it.

I get several errors.

pack 4e1e6888: does not exist
pack b09a7423: not referenced in any index

About 15 “pack does not exist” and about 60 pack not referenced errors.

What’s strange is that I just run prune (with --max-unused=unlimited) before this, and didn’t do new backups since. My backups were done using the 0.12 version, and prune and check using 0.13.1.

The backup was interrupted few times, and most of the files are critical, so if there was a way to just find out what files are affected and “clean” the repo, it would be good.

Hi :wave:

If the prune command finished without any errors, what you see might be lingering files from half backups + you told prune to not remove unused files, and the data could be intact.

Last time I tried check was referring these like “error” which was a bit much, but didn’t run it for a while.

Could you run prune but allow deletions? Or would it be too costly? :smile:

I am surprised if the prune -.max-unused=unlimited, doesn’t delete the files. Is that the case?
Deletions are typically free in B2.

What I tried avoid was the time/bandwidth to download/re-upload.

The prune wouldn’t fix the 15 pack XXX: does not exist though? How to fix those?

Ah sorry I mixed up the things I guess. From the wiki:

If the string unlimited is passed, there is no limit for partly unused files. This means that as long as some data is still used within a file stored in the repo, restic will just leave it there. Use this if you want to minimize the time and bandwidth used by the prune operation.

Now I don’t have any theories for why “pack XXX: does not exist” happens after a successful prune.

Interestingly after running restic prune the next restic check was without errors.

That rather looks like the file listing returned by B2 was stale. In fact, prune includes several sanity checks (similar to the check command) which would cause it to fail if these pack related errors exist during these checks.

Thanks, Michael.

I encountered pretty many B2-related errors recently, the above and a few other ones as well:

Is B2 flakier than the other backends in your experience? On the positive side, nothing too severe, and I am in production with my setup now, so thank you!

It feels like we have some B2 related temporary problems a few times each year, which then leads to a burst of B2 related issues/forum posts. However, I have no idea whether it’s just more problems with B2 than the other backends or whether B2 is just used a lot or whatever.

Restic just getting hung with B2 is one that is annoying for me, as I need to build some kind of defense around it; somehow detect the situation and restart. I would prefer some solution in restic, if the b2 library inside restic doesn’t work as expected.

What makes you say that it’s the B2 library that is not working as expected?

EDIT: Never mind that question - I was reading it on my phone and missed the link to the issue. Sorry.