# Repairing "missing blob" errors

**URL:** <https://kopia.discourse.group/t/repairing-missing-blob-errors/1050>\
**Category:** Support\
**Created:** [April 15, 2022, 4:17pm UTC](https://kopia.discourse.group/t/repairing-missing-blob-errors/1050 "2022-04-15T16:17:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![robjk](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/robjk/32/58_2.png) [@robjk](https://kopia.discourse.group/u/robjk)\
**Post date:** [April 15, 2022, 4:17pm UTC](https://kopia.discourse.group/t/repairing-missing-blob-errors/1050/1 "2022-04-15T16:17:17Z")

</div>

Before I do something egregiously stupid, I’d appreciate someone else confirming or correcting my thinking here.

I had been remiss in running `kopia repository maintenance --full` and when I got around to it:

> Processed 30864 contents, discovered 161218…  
> Finished full maintenance.  
> ERROR: snapshot GC failure: error running snapshot gc: unable to find in-use content ID: error walking snapshot tree: error reading directory: unable to open object: k25a0a66a8f229cab93a7eb95aff0e179: unexpected content error: getCacheForContentID: BLOB not found

My presumption here is that at some point, object `k25a0a66a8f229cab93a7eb95aff0e179` never got written to the repository.

Is there any way to “fix” this other than removing all snapshots that contain `k25a0a66a8f229cab93a7eb95aff0e179`?

Ideally, I would discover that erroring snapshots would be the only ones containing this directory ref and I could just delete those? Otherwise, I expect that I will have to partially restore the damaged snapshots?

---

<div class="post-metadata">

**Author:** ![jkowalski](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/jkowalski/32/3_2.png) [@jkowalski](https://kopia.discourse.group/u/jkowalski)\
**Post date:** [April 15, 2022, 7:10pm UTC](https://kopia.discourse.group/t/repairing-missing-blob-errors/1050/2 "2022-04-15T19:10:43Z")

</div>

What’s your backend provider? There’s currently no universal answer to this type of question - it all depends on what exactly happened. Ping me on slack so we can investigate.

---

<div class="post-metadata">

**Author:** ![robjk](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/robjk/32/58_2.png) [@robjk](https://kopia.discourse.group/u/robjk)\
**Post date:** [April 18, 2022, 1:41pm UTC](https://kopia.discourse.group/t/repairing-missing-blob-errors/1050/3 "2022-04-18T13:41:16Z")

</div>

I’m using GCS. I’ll ping you. I kicked off a script to validate all of the snapshots under the presumption that it would at least tell me which of my snapshots are good.

---

<div class="post-metadata">

**Author:** ![wmerlotto](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/wmerlotto/32/65_2.png) [@wmerlotto](https://kopia.discourse.group/u/wmerlotto)\
**Post date:** [April 25, 2022, 11:39pm UTC](https://kopia.discourse.group/t/repairing-missing-blob-errors/1050/4 "2022-04-25T23:39:14Z")

</div>

Any progress here?  
I have the same problem with “BLOB not found”…

---

<div class="post-metadata">

**Author:** ![robjk](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/robjk/32/58_2.png) [@robjk](https://kopia.discourse.group/u/robjk)\
**Post date:** [August 5, 2023, 9:28pm UTC](https://kopia.discourse.group/t/repairing-missing-blob-errors/1050/5 "2023-08-05T21:28:28Z")

</div>

I have finally gotten back to really digging into this. This is with a GCS backend.

TL;DR: I did a sequence of verify / maintenance cycles and I’m stilling getting a profusion of “missing blob” errors.

More details:

```auto
kopia snapshot fix invalid-files --commit
# ...time and logs noting that some file were fixed
kopia maintenance run --full
# ...time...
# final errors dumping errors featuring "missing blob" per above

```

I searched here a bit and saw some posts from jkowalski that suggested that I could instead do (and so did) the following:

```shell
kopia snapshot verify --verify-files-percent 100
# ...time... and no additional corrections to the backend
kopia maintenance run --full
# ...time... and still "missing blob" errors

```

So any suggestions?

I am imagining trying to use `kopia repository sync-to gcs` to a new repository? Presumably if the verify passed then a copy of only the valid contents would be error free?

---

<div class="post-metadata">

**Author:** ![robjk](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/robjk/32/58_2.png) [@robjk](https://kopia.discourse.group/u/robjk)\
**Post date:** [August 5, 2023, 10:00pm UTC](https://kopia.discourse.group/t/repairing-missing-blob-errors/1050/6 "2023-08-05T22:00:14Z")

</div>

Perhaps I mis-used the `snapshot verify` command? I will run it again like so:

```shell
kopia snapshot verify --verify-files-percent=100

```
