# Can not access repository, failed to get blob

**URL:** <https://kopia.discourse.group/t/can-not-access-repository-failed-to-get-blob/1274>\
**Category:** Support\
**Created:** [July 13, 2022, 10:41am UTC](https://kopia.discourse.group/t/can-not-access-repository-failed-to-get-blob/1274 "2022-07-13T10:41:06Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peachtree](https://avatars.discourse-cdn.com/v4/letter/p/f07891/32.png) [@Peachtree](https://kopia.discourse.group/u/Peachtree)\
**Post date:** [July 13, 2022, 10:41am UTC](https://kopia.discourse.group/t/can-not-access-repository-failed-to-get-blob/1274/1 "2022-07-13T10:41:06Z")

</div>

I have a large kopia repository in Gdrive. Everything worked fine until yesterday I could not access the repository anymore and got the following error message:

- Error: error connecting to repository: unable to list sources: unable to find manifest entries: unable to load manifest contents: error loading manifest content: error getting cached content: failed to get blob with ID qa2328e949a262602138a0c377e1af092-s8209e3abbb2ab48d110: BLOB not found.

I have no clue what caused this for everything was running fine the day before. The only thing changed was upgrading kopia to the new version.

Any idea what to do?

---

<div class="post-metadata">

**Author:** ![basldfalksjdf](https://avatars.discourse-cdn.com/v4/letter/b/ce73a5/32.png) [@basldfalksjdf](https://kopia.discourse.group/u/basldfalksjdf)\
**Post date:** [July 13, 2022, 1:56pm UTC](https://kopia.discourse.group/t/can-not-access-repository-failed-to-get-blob/1274/2 "2022-07-13T13:56:43Z")

</div>

Can you try downgrading Kopia to the version that worked and see if the error persists? That is an easy way to rule out if this was caused by a regression. Downgrading is easy, just download the version you had previously. The only thing to note is you cannot downgrade to below v0.9.0 because of the repo change.

Otherwise, are you using the `gdrive` repo or connecting to gdrive through the `rclone` repo? When you say you cannot access the repo, do you mean you literally cannot connect to it or that you can connect and you just get errors when trying to run a snapshot or a restore? If the latter, there could be data corruption. Try `kopia snapshot verify`. One thing that may have happened is a snapshot was running when you upgraded and that causes some issue with blobs that Kopia thinks should be there but are not.

---

<div class="post-metadata">

**Author:** ![Peachtree](https://avatars.discourse-cdn.com/v4/letter/p/f07891/32.png) [@Peachtree](https://kopia.discourse.group/u/Peachtree)\
**Post date:** [July 13, 2022, 3:09pm UTC](https://kopia.discourse.group/t/can-not-access-repository-failed-to-get-blob/1274/3 "2022-07-13T15:09:55Z")

</div>

Thank you for the quick response.

I reinstalled the previous version v0.11.2 but that did not solve the issue.

I am using the rclone repo.

Normally I use the KopiaUI interface and using this I cannot connect to the rclone repo and it gives the stated error message.  
But just now I tried using the Kopia command line commands and that gave the following results:

1. kopia repository connect from-config --token , connects to the rclone repo without a problem.
2. kopia blob list; gives no errors.
3. kopia content list; gives no errors.
4. kopia index list; gives no errors.
5. kopia manifest list; ERROR unable to find manifests: unable to load manifest contents: error loading manifest content: error getting cached content: failed to get blob with ID q886d874d6a8b1df0149ec4dbe8ae24b8-s129a53ef8c78c766110: BLOB not found.

Does this give you any clues?

---

<div class="post-metadata">

**Author:** ![basldfalksjdf](https://avatars.discourse-cdn.com/v4/letter/b/ce73a5/32.png) [@basldfalksjdf](https://kopia.discourse.group/u/basldfalksjdf)\
**Post date:** [July 13, 2022, 4:25pm UTC](https://kopia.discourse.group/t/can-not-access-repository-failed-to-get-blob/1274/4 "2022-07-13T16:25:44Z")

</div>

Why this happened, I do not know. Someone else will have to jump in to diagnose.

How to fix it? Try reading

> <https://github.com/kopia/kopia/issues/1087>
>
> My repository seems to be in a corrupted state somehow. I've done nothing other …than periodically run snapshot create. 
> 
> If I do a \`kopia content verify\`:
> 
> \`\`\`
> Finished verifying 1222 contents, found 272 errors.
> ERROR: encountered 272 errors
> \`\`\`
> What do I do next?

and

> **[Repository Consistency and Repair](https://kopia.io/docs/advanced/consistency/)**
>
> Fast and Secure Open-Source Backup Software for Windows, Mac, and Linux

to see if anything they recommend fixes the issue for you.

If this were my repo, if all else fails, I would run `kopia snapshot fix invalid-files --verify-files-percent=100 --commit`. That may or may not work. It worked for

[Snapshot GC failure: error running snapshot gc: unable to find in-use content ID](https://kopia.discourse.group/t/snapshot-gc-failure-error-running-snapshot-gc-unable-to-find-in-use-content-id/1257).

---

<div class="post-metadata">

**Author:** ![Peachtree](https://avatars.discourse-cdn.com/v4/letter/p/f07891/32.png) [@Peachtree](https://kopia.discourse.group/u/Peachtree)\
**Post date:** [July 14, 2022, 6:06am UTC](https://kopia.discourse.group/t/can-not-access-repository-failed-to-get-blob/1274/5 "2022-07-14T06:06:50Z")

</div>

I have tried runnng kopia snapshot fix invalid-files --verify-files-percent=100 --commit. But that did not help. It gave the following result:

* * *

C:\Users\Ruud\>kopia snapshot fix invalid-files --verify-files-percent=100 --commit  
2022-07-13T20:13:54.021704+02:00 Listing blobs…  
2022-07-13T21:47:43.194737+02:00 10000 blobs…  
2022-07-13T22:56:55.656566+02:00 20000 blobs…  
2022-07-13T23:41:19.251981+02:00 Listed 26227 blobs.  
2022-07-13T23:41:19.252225+02:00 Listing all snapshots…  
2022-07-13T23:41:47.081074+02:00 ERROR error running maintenance: error running maintenance: unable to get maintenance params: error looking for maintenance manifest: unable to load manifest contents: error loading manifest content: error getting cached content: failed to get blob with ID q9f929af62689a12d7b6405816434c9f5-s3926780f93563acb110: BLOB not found

## 2022-07-13T23:41:49.365427+02:00 ERROR unable to list snapshot manifests: unable to find snapshot manifests: unable to load manifest contents: error loading manifest content: error getting cached content: failed to get blob with ID qa2328e949a262602138a0c377e1af092-s8209e3abbb2ab48d110: BLOB not found

Has anybody any ideas what I could try next?

---

<div class="post-metadata">

**Author:** ![basldfalksjdf](https://avatars.discourse-cdn.com/v4/letter/b/ce73a5/32.png) [@basldfalksjdf](https://kopia.discourse.group/u/basldfalksjdf)\
**Post date:** [July 14, 2022, 3:25pm UTC](https://kopia.discourse.group/t/can-not-access-repository-failed-to-get-blob/1274/6 "2022-07-14T15:25:29Z")

</div>

Did you read [ERROR: unable to get maintenance params: error looking for maintenance manifest: unable to load manifest contents: error loading manifest content: getCacheForContentID: BLOB not found · Issue #1087 · kopia/kopia · GitHub](https://github.com/kopia/kopia/issues/1087) and try the steps that worked for people there? Specifically, see [ERROR: unable to get maintenance params: error looking for maintenance manifest: unable to load manifest contents: error loading manifest content: getCacheForContentID: BLOB not found · Issue #1087 · kopia/kopia · GitHub](https://github.com/kopia/kopia/issues/1087#issuecomment-1120107789) and [ERROR: unable to get maintenance params: error looking for maintenance manifest: unable to load manifest contents: error loading manifest content: getCacheForContentID: BLOB not found · Issue #1087 · kopia/kopia · GitHub](https://github.com/kopia/kopia/issues/1087#issuecomment-1126660933)

---

<div class="post-metadata">

**Author:** ![Peachtree](https://avatars.discourse-cdn.com/v4/letter/p/f07891/32.png) [@Peachtree](https://kopia.discourse.group/u/Peachtree)\
**Post date:** [July 14, 2022, 8:41pm UTC](https://kopia.discourse.group/t/can-not-access-repository-failed-to-get-blob/1274/7 "2022-07-14T20:41:19Z")

</div>

No sorry, I did glance at this, but it looked rather complicate. Since I did not have any time today, I decided to run the kopia snapshot fix first, because that could run overnight and share the results. I’ll certainly look into this more closely tomorrow.

---

<div class="post-metadata">

**Author:** ![Peachtree](https://avatars.discourse-cdn.com/v4/letter/p/f07891/32.png) [@Peachtree](https://kopia.discourse.group/u/Peachtree)\
**Post date:** [July 15, 2022, 10:40am UTC](https://kopia.discourse.group/t/can-not-access-repository-failed-to-get-blob/1274/8 "2022-07-15T10:40:32Z")

</div>

I followed all steps from your link. Found the erroneous index file, but removing this index file from the remote repo did not solve the problem. However I did notice something else which seems odd to me. All remote index files are numbered sequentially from 1\_0 thru 1\_f, 2\_0 thru 2\_f, etc. But in my erroneous index file some indexes are missing. The current list is: 5\_0, 5\_2, 5\_3, 5\_4, 5\_6, 5\_7, 5\_8, 5\_9, 5\_a, 5\_d, 5\_e all dated 11 july 2022. But missing 5\_1, 5\_5, 5\_b, 5\_c, and possibly 5\_f.  
I suppose that this could cause the problems. Is there any way to rebuild the index?

---

<div class="post-metadata">

**Author:** ![basldfalksjdf](https://avatars.discourse-cdn.com/v4/letter/b/ce73a5/32.png) [@basldfalksjdf](https://kopia.discourse.group/u/basldfalksjdf)\
**Post date:** [July 15, 2022, 2:33pm UTC](https://kopia.discourse.group/t/can-not-access-repository-failed-to-get-blob/1274/9 "2022-07-15T14:33:40Z")

</div>

Try `kopia index recover --parallel=10 --commit`. You could also consider including the `--delete-indexes` command, but I would recommend downloading your indexes to your computer first, in case something goes wrong and you want to put back the ‘old’ ones. See [index recover | Kopia](https://kopia.io/docs/reference/command-line/advanced/index-recover/)

Try running a snapshot and maintenance after that. If still errors, you could also try `kopia snapshot fix invalid-files --verify-files-percent=100 --parallel=10 --commit` again after you try recovering the index.

---

<div class="post-metadata">

**Author:** ![Peachtree](https://avatars.discourse-cdn.com/v4/letter/p/f07891/32.png) [@Peachtree](https://kopia.discourse.group/u/Peachtree)\
**Post date:** [July 16, 2022, 10:48am UTC](https://kopia.discourse.group/t/can-not-access-repository-failed-to-get-blob/1274/10 "2022-07-16T10:48:48Z")

</div>

I have run `kopia index recover --parallel=10 --commit --delete-indexes`. The run ended without errors, but did not solve the problem. The above mentioned index list is exactly the same with the same files “missing”. Apparently these files are not missing and the index is correct this way.

Next I ran `kopia snapshot fix invalid-files --verify-files-percent=100 --parallel=10 --commit` . This ended in `error unable to get maintenance params: error looking for maintenance manifest: unable to load manifest contents: error loading manifest content: error getting cached content: failed to get blob with ID q6a0d05972b5f739d45a46ce481fcda0d-s086049b6da019c69110: BLOB not found`  
I checked this blob in the rclone repo and q6a\_0d0 is empty.  
Then I checked all other blobs mentioned in the previous error messages, and all are empty in the rclone repo.

Since I understood from other discussions that kopia will never ever write empty files to the repo, this clearly is in error. But how to solve this?

---

<div class="post-metadata">

**Author:** ![basldfalksjdf](https://avatars.discourse-cdn.com/v4/letter/b/ce73a5/32.png) [@basldfalksjdf](https://kopia.discourse.group/u/basldfalksjdf)\
**Post date:** [July 16, 2022, 3:33pm UTC](https://kopia.discourse.group/t/can-not-access-repository-failed-to-get-blob/1274/11 "2022-07-16T15:33:11Z")

</div>

Did you try what is listed at [https://kopia.io/docs/advanced/consistency/:](https://kopia.io/docs/advanced/consistency/:)

> [@](#):
>
> ## Repairing Repository
> 
> Each type of data corruption is different, so there’s not a single approach to data recovery.
> 
> There are few tips to try, which are generally safe to try:
> 
> 1. Look for repository files with zero size and remove them. Kopia will never write such files and if they are present, it indicates filesystem data corruption. Simply removing them may work.
> 2. Try to open the repository from another computer. If that works, local cache may be corrupted and clearing that should fix the issue. Please do NOT clear the cache on the main computer where the corruption has manifested. Data in cache may help the recovery.
> 3. Look for files with unusual timestamps (like year 1970, year 2038 or similar), file extensions, etc and try to clean them up.
> 4. If a repository can’t be opened but was working recently and maintenance has not run yet, it may be helpful to try to remove (or stash away) the most recently-written index files whose names start with `x` in the reverse timestamp order one by one until the issue is fixed. This will effectively roll back the repository writes to a prior state. Exercise caution when removing the files.

---

<div class="post-metadata">

**Author:** ![Peachtree](https://avatars.discourse-cdn.com/v4/letter/p/f07891/32.png) [@Peachtree](https://kopia.discourse.group/u/Peachtree)\
**Post date:** [July 16, 2022, 5:37pm UTC](https://kopia.discourse.group/t/can-not-access-repository-failed-to-get-blob/1274/12 "2022-07-16T17:37:03Z")

</div>

Yes I did:

1. Looking for zero size folders is not a standard function in Gdrive and doing this manually with this number of folders is a nightmare…  
But even then, there appear to be so many empty folders. And I fear that deleting so many folders corrupt things even more.

2. I tries that as first. But with the same problem.

3. No strange dates to be found.

4. I tried this too, but after a while I stashed away so many index files that I might as well delete all of them 😉 So i put them all back again.

---

<div class="post-metadata">

**Author:** ![basldfalksjdf](https://avatars.discourse-cdn.com/v4/letter/b/ce73a5/32.png) [@basldfalksjdf](https://kopia.discourse.group/u/basldfalksjdf)\
**Post date:** [July 16, 2022, 11:16pm UTC](https://kopia.discourse.group/t/can-not-access-repository-failed-to-get-blob/1274/13 "2022-07-16T23:16:25Z")

</div>

Someone else will have to jump in if they have any ideas on how to help fix the issues you have. If it cannot be fixed, you may need to wipe the repo and start over, if possible.

FWIW, Im looking at people complaining about corrupt repos, and it seems to be more people that are using `rclone` rather than a native Kopia repo.

---

<div class="post-metadata">

**Author:** ![Peachtree](https://avatars.discourse-cdn.com/v4/letter/p/f07891/32.png) [@Peachtree](https://kopia.discourse.group/u/Peachtree)\
**Post date:** [July 17, 2022, 12:22pm UTC](https://kopia.discourse.group/t/can-not-access-repository-failed-to-get-blob/1274/14 "2022-07-17T12:22:15Z")

</div>

I agree that it is better to wipe the repo and start over. But that raises the question how to do that. Can I just delete all content from Gdrive? Wipe the content with kopia content delete? But leaving the root folder intact in Gdrive will result in the same problems I have now?

---

<div class="post-metadata">

**Author:** ![basldfalksjdf](https://avatars.discourse-cdn.com/v4/letter/b/ce73a5/32.png) [@basldfalksjdf](https://kopia.discourse.group/u/basldfalksjdf)\
**Post date:** [July 17, 2022, 5:40pm UTC](https://kopia.discourse.group/t/can-not-access-repository-failed-to-get-blob/1274/15 "2022-07-17T17:40:09Z")

</div>

I do not think Kopia has a command to delete a whole repository easily. You could do `content delete` or `snapshot delete` or `manifest delete`, but you would need to do that to each individual respective item.

On the other hand, whenever I need to clear a repo, I literally just go to the platform and delete all the Kopia files in the repo. Presumably, there is a specific folder on Gdrive that contains the Kopia repo. Just log into Gdrive and delete that whole folder. Recreate the folder again in Gdrive. Then reconnect to Gdrive with Kopia. You are literally starting a new repo from Kopia’s perspective. Note that this means you will lose all your policies as well, so you will need to recreate them.

---

<div class="post-metadata">

**Author:** ![Peachtree](https://avatars.discourse-cdn.com/v4/letter/p/f07891/32.png) [@Peachtree](https://kopia.discourse.group/u/Peachtree)\
**Post date:** [July 18, 2022, 10:15am UTC](https://kopia.discourse.group/t/can-not-access-repository-failed-to-get-blob/1274/16 "2022-07-18T10:15:51Z")

</div>

I’ve deleted the old repo and created successfully a new one. Recreated the snapshots and policies and it’s running at this moment.

Pity that we could not save the old repo but so be it. There is no data loss since the repo just contained backup files which I also have on a Kopia repo on an external drive. It just takes a long time to upload all data anew.

Thank for all your help and advices.

---

<div class="post-metadata">

**Author:** ![compumatter](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/compumatter/32/1139_2.png) [@compumatter](https://kopia.discourse.group/u/compumatter)\
**Post date:** [August 4, 2024, 9:33pm UTC](https://kopia.discourse.group/t/can-not-access-repository-failed-to-get-blob/1274/17 "2024-08-04T21:33:19Z")

</div>

2 years later. Same error.  
ERROR error running maintenance: error running maintenance: unable to get maintenance params: error looking for maintenance manifest: unable to load manifest contents: error loading manifest content: invalid checksum at qa94279184ddcbea10d3ae0e97fa972d0-s8174fe0142ffcc0212b offset 32 length 543/543: decrypt: unable to decrypt content: cipher: message authentication failed  
ERROR could not get defined policy: unable to find policy for source: unable to load manifest contents: error loading manifest content: invalid checksum at qa94279184ddcbea10d3ae0e97fa972d0-s8174fe0142ffcc0212b offset 32 length 543/543: decrypt: unable to decrypt content: cipher: message authentication failed

I’ll report back if I have a discovery but I think this was the cause of this issue.

All was fine until I did a kopia policy set using variables like this.

From one bash script I sourced another which contained the value of `default_policy_schedule="0,30 6-23 * * 1-6"`

Back to the original script it ran  
`kopia policy set ${dir} --snapshot-time-crontab='${default_policy_schedule}'`

However this threw errors and when echo’d to the terminal it revealed:

`kopia policy set /root --snapshot-time-crontab='0,30 6-23 client_device_add.sh emp....`

Along with the error:  
`ERROR scheduling policy: invalid scheduling policy: invalid cron expression "0,30 6-23 client_device_add.sh empty ignore_file_patterns.sh kopiastuff.sh`

Somehow it ended up inserting the file list of the same directory into that variable 🤔

From that point forward I started getting those errors:

`ERROR error running maintenance: error running maintenance: unable to get maintenance params: error looking for maintenance manifest: unable to load manifest contents: error loading manifest content: invalid checksum at qa94279184ddcbea10d3ae0e97fa972d0-s8174fe0142ffcc0212b offset 32 length 543/543: decrypt: unable to decrypt content: cipher: message authentication failed`

---

<div class="post-metadata">

**Author:** ![compumatter](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/compumatter/32/1139_2.png) [@compumatter](https://kopia.discourse.group/u/compumatter)\
**Post date:** [August 4, 2024, 9:40pm UTC](https://kopia.discourse.group/t/can-not-access-repository-failed-to-get-blob/1274/18 "2024-08-04T21:40:27Z")

</div>

I can confirm that that was the cause of this issue. In my case I was working with a new repo so it was easy for me to clear its contents and retest. This proved to be the problem. Solved
