# Unable to rewrite content - BLOB not found

**URL:** <https://kopia.discourse.group/t/unable-to-rewrite-content-blob-not-found/1689>\
**Category:** Support\
**Created:** [January 10, 2023, 12:04pm UTC](https://kopia.discourse.group/t/unable-to-rewrite-content-blob-not-found/1689 "2023-01-10T12:04:38Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![samia](https://avatars.discourse-cdn.com/v4/letter/s/dbc845/32.png) [@samia](https://kopia.discourse.group/u/samia)\
**Post date:** [January 10, 2023, 12:04pm UTC](https://kopia.discourse.group/t/unable-to-rewrite-content-blob-not-found/1689/1 "2023-01-10T12:04:38Z")

</div>

Hi,

I’m getting the followin error (when running full maintenance):

```auto
unable to rewrite content "0057afef270c3add1bc0b5fa768821f0": unable to get content data and info: error getting cached content: failed to get blob with ID pb867ee1b7e62088719d57e4b405cdb0a-sf76151515556c8a8118: BLOB not found

```

I know that there are a lot of other topics on this with some suggestions on how to solve it. I’ve tried more or less all of them (as fare as I was able to do it) but nothing worked. Any suggestions? I’m backing up to an external USB-HDD, so no rclone involved.

---

<div class="post-metadata">

**Author:** ![samia](https://avatars.discourse-cdn.com/v4/letter/s/dbc845/32.png) [@samia](https://kopia.discourse.group/u/samia)\
**Post date:** [January 11, 2023, 1:01pm UTC](https://kopia.discourse.group/t/unable-to-rewrite-content-blob-not-found/1689/2 "2023-01-11T13:01:15Z")

</div>

Wanted to additionally mention, that I’ve tried the following commands (in various order):

```auto
kopia blob delete --advanced-commands=enabled pb867ee1b7e62088719d57e4b405cdb0a-sf76151515556c8a8118

kopia blob gc --advanced-commands=enabled --delete=yes

kopia index recover --advanced-commands=enabled --commit

kopia content delete --advanced-commands=enabled 0057afef270c3add1bc0b5fa768821f0

kopia content rewrite --advanced-commands=enabled 0057afef270c3add1bc0b5fa768821f0

kopia snapshot fix invalid-files --verify-files-percent=100 --commit

```

Nothing worked and whenever I run full maintenance I always get the above mentioned error.

Any suggestions what I can do?

---

<div class="post-metadata">

**Author:** ![elel](https://avatars.discourse-cdn.com/v4/letter/e/ecae2f/32.png) [@elel](https://kopia.discourse.group/u/elel)\
**Post date:** [January 12, 2023, 8:34am UTC](https://kopia.discourse.group/t/unable-to-rewrite-content-blob-not-found/1689/3 "2023-01-12T08:34:12Z")

</div>

Since you already deleted the blob this might be counterintuitive, but try:

`kopia create --force-hash=100 <stuff to snapshot>`

This will force kopia to rescan and rehash everything and write out data that doesn’t exist in the repository. This will take time as it will seems as though kopia is performing a first time snapshot, but quicker because there is not much to upload to the repository. kopia should figure out what was originally in pb867ee1b7e62088719d57e4b405cdb0a-sf76151515556c8a8118 and re-upload it with a different blob id and updating indexes. kopia is rewriting the content because the data should still be on your system.

---

<div class="post-metadata">

**Author:** ![samia](https://avatars.discourse-cdn.com/v4/letter/s/dbc845/32.png) [@samia](https://kopia.discourse.group/u/samia)\
**Post date:** [January 12, 2023, 9:02am UTC](https://kopia.discourse.group/t/unable-to-rewrite-content-blob-not-found/1689/4 "2023-01-12T09:02:30Z")

</div>

Hi elel, thanks for your support.

I’ve tried

```auto
kopia snapshot create --force-hash=100 <stuff to snapshot>

```

but it didn’t solve the problem.

It might be, that the content is not on my system any more, that’s why I’ve also tried

```auto
kopia content delete

```

but this did also not help.

I don’t understand why a blob-deletion AND a content-deletion does not solve the problem…

---

<div class="post-metadata">

**Author:** ![elel](https://avatars.discourse-cdn.com/v4/letter/e/ecae2f/32.png) [@elel](https://kopia.discourse.group/u/elel)\
**Post date:** [January 13, 2023, 6:46am UTC](https://kopia.discourse.group/t/unable-to-rewrite-content-blob-not-found/1689/5 "2023-01-13T06:46:51Z")

</div>

It’s possible then that whatever remains in the blob just needs to age out and get dropped from the repository naturally. At that point, kopia should just delete the blob altogether. Speculation on my part however.

---

<div class="post-metadata">

**Author:** ![samia](https://avatars.discourse-cdn.com/v4/letter/s/dbc845/32.png) [@samia](https://kopia.discourse.group/u/samia)\
**Post date:** [January 13, 2023, 2:47pm UTC](https://kopia.discourse.group/t/unable-to-rewrite-content-blob-not-found/1689/6 "2023-01-13T14:47:55Z")

</div>

Hmmm. Maybe, but to be honest I don’t think that this will happen, because I’ve already tried to delete the blob with  
`kopia blob delete --advanced-commands=enabled pb867ee1b7e62088719d57e4b405cdb0a-sf76151515556c8a8118`  
and I also did run  
`kopia maintenance --safety=none`  
several times.

Is it somehow pissible to determin (with missing blob) to figures out:

- in which contents a blob is needed?
- in which snapshots the contents (or the missing blog) are in?

Then I would think about deleting these snapshots (not sure if this will solve my problem)…

---

<div class="post-metadata">

**Author:** ![alejandor](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/alejandor/32/131_2.png) [@alejandor](https://kopia.discourse.group/u/alejandor)\
**Post date:** [July 30, 2023, 6:14pm UTC](https://kopia.discourse.group/t/unable-to-rewrite-content-blob-not-found/1689/7 "2023-07-30T18:14:44Z")

</div>

So @samia did you find any way to rewrite the blobs? I’m in a similar predicament.

---

<div class="post-metadata">

**Author:** ![samia](https://avatars.discourse-cdn.com/v4/letter/s/dbc845/32.png) [@samia](https://kopia.discourse.group/u/samia)\
**Post date:** [July 31, 2023, 8:59am UTC](https://kopia.discourse.group/t/unable-to-rewrite-content-blob-not-found/1689/8 "2023-07-31T08:59:43Z")

</div>

Hi alejandor,  
no, I didn’t find a solution, but the problem “aged out” (as described by elel).

---

<div class="post-metadata">

**Author:** ![alejandor](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/alejandor/32/131_2.png) [@alejandor](https://kopia.discourse.group/u/alejandor)\
**Post date:** [July 31, 2023, 9:06am UTC](https://kopia.discourse.group/t/unable-to-rewrite-content-blob-not-found/1689/9 "2023-07-31T09:06:16Z")

</div>

Interesting. I tried to force that with `kopia maintenance run --full --safety=none` but no luck. A difference in my case is that maintenance is not throwing errors, only `snapshot verify` is.

Oh well, thanks for the prompt reply.
