Full Maintenance reports: error rewriting contents in short packs: failed to rewrite 2 contents

I had started discussion in this topic Kopia (UI) reports error during maintenance but does not tell any details - #2 by phunsoft , but there is too much irrelevant informaiton (I’m not allowed to delete that topic). I have done some more investigation in the meantime, so let me start over.

The Problem

Recently, kopia started to report error at end of full maintenance run:

error rewriting contents in short packs: failed to rewrite 2 contents

Unfortunately, this is all the information kopia tells me.

From running kopia maintenance info I can see that this started on October 10th:

Recent Maintenance Runs:
...
full-rewrite-contents:
  ...
  2026-10-10 21:14:12 CEST (9s) ERROR: failed to rewrite 2 contents

Looking at the repository lists two files of “temporary character”, which happen to have a timestamp of October 10th. Conincidence or source of the error?

I do not understand the file in detail, but am thinking to delete these 2 files. I am a bit scared this could damage the repository irreversably.

Any suggestion on how to proceed?

Is there really noone who can help me sort this out?

Getting a “maintenance error” each day I backup doesn’t make me feel comfortable.

Please check if all files and folders have correct ownership and permissions.

This Github issue might help:

Please contact Kopia developers on Slack or Github before running any dangerous commands!

Thanks a lot. I’ll work through the list.

Did you get your errors sorted out? I have a similar issue, and none of the solutions posted here so far seemed to work for me.

No, I didn’t suceed yet. Didn’t have time to look into until no. Here is what I’ve done and found so far:

I have run

kopia content verify --config-file=/home/peter/.config/kopia/repository-1791659205884.config --include-deleted --full

This took some 35 hours and finally reported this list of missing blobs (Note: I have removed most of the “Verified xx of yy…” line for readability):

Listing blobs...
  10000 blobs...
  20000 blobs...
  30000 blobs...
Listed 35899 blobs.
Verifying contents...
  Verified 1 contents, 0 errors, estimating...
  Verified 337 of 651652 contents (0.1%), 0 errors, remaining 1h59m27s, ETA 2026-11-08 18:45:06 CET
  Verified 356 of 651652 contents (0.1%), 0 errors, remaining 3h27m26s, ETA 2026-11-08 20:13:08 CET
  ,,,
content 040b2ce7e4a6b7155af004e18aa8ad19 depends on missing blob pbf417990b0e904a1ea52371da838f11f-s7e834091e91ead2b143
content 06cbb614e476a2a6326774a457f5e436 depends on missing blob p7bba4d14f5826b8c998a9301441ccc62-s7e834091e91ead2b143
content 0fc30da7c2aabda815ae08e15423fb9b depends on missing blob p4d48d5d877a4f19a1a64f6393fa37a96-s769e811c258a6bcf143
content 179238a72fb817741924a70425f5c242 depends on missing blob pbf417990b0e904a1ea52371da838f11f-s7e834091e91ead2b143
content 244ff5064516addcc07be944d56d78c9 depends on missing blob p7bba4d14f5826b8c998a9301441ccc62-s7e834091e91ead2b143
content 2f21d6d48744c16485d19047b3d6f31b depends on missing blob pbf417990b0e904a1ea52371da838f11f-s7e834091e91ead2b143
content 3bda98a7ca0bf23c4bf0c42046dc5315 depends on missing blob p5dcb5a31fef8f17d69dea6f8158965b2-s6c742747e105d3ac143
content 4a1db824722b3d3d4553a47388fc0438 depends on missing blob p7bba4d14f5826b8c998a9301441ccc62-s7e834091e91ead2b143
content 4b518a0e76d9cec6d3a4bd3072b82fd1 depends on missing blob pbf417990b0e904a1ea52371da838f11f-s7e834091e91ead2b143
content 500ae87dd7c9225945ab0eb75d1509ad depends on missing blob pbf417990b0e904a1ea52371da838f11f-s7e834091e91ead2b143
content 62b8b6a6303010eaaee5d2ba697a2e3d depends on missing blob pbf417990b0e904a1ea52371da838f11f-s7e834091e91ead2b143
content 6da1c2584ef2362ef096d3c6d5f8e572 depends on missing blob pbf417990b0e904a1ea52371da838f11f-s7e834091e91ead2b143
content 74c2d5e2d21e40e04e5a8f6b93ffe553 depends on missing blob p7bba4d14f5826b8c998a9301441ccc62-s7e834091e91ead2b143
content 8403f1e951a90f9e5677e1f71324f0ae depends on missing blob pbf417990b0e904a1ea52371da838f11f-s7e834091e91ead2b143
content 8c831edd828ad8c18c5abe097eea6845 depends on missing blob p7bba4d14f5826b8c998a9301441ccc62-s7e834091e91ead2b143
content 9182da56e60f313e83991d38dc74e8cf depends on missing blob p7bba4d14f5826b8c998a9301441ccc62-s7e834091e91ead2b143
content a3e16ac0c365a8eda6fe2a78d1f1c73c depends on missing blob pbf417990b0e904a1ea52371da838f11f-s7e834091e91ead2b143
content c1ceb079baaa0387cf4518ebf49a07be depends on missing blob p7bba4d14f5826b8c998a9301441ccc62-s7e834091e91ead2b143
content cdc3643f878ec983e662fb0c4f0510c1 depends on missing blob p7bba4d14f5826b8c998a9301441ccc62-s7e834091e91ead2b143
content d14071fda357bf9faca54cb8e9cc809d depends on missing blob p7bba4d14f5826b8c998a9301441ccc62-s7e834091e91ead2b143
content d504dfb943a207bc845d35aebd28551a depends on missing blob pbf417990b0e904a1ea52371da838f11f-s7e834091e91ead2b143
content e49c3d218bf3a3ac0faf6e94b2f7cae2 depends on missing blob pbf417990b0e904a1ea52371da838f11f-s7e834091e91ead2b143
content fe65cd52d77dc9f63d692e4c31ee4386 depends on missing blob pbf417990b0e904a1ea52371da838f11f-s7e834091e91ead2b143
content ffd874897d2e6618b913b7eb30b597a1 depends on missing blob p7bba4d14f5826b8c998a9301441ccc62-s7e834091e91ead2b143
  ...
  Verified 526642 of 651652 contents (80.8%), 24 errors, remaining 5h44m53s, ETA 2026-11-09 22:43:26 CET
  Verified 526662 of 651652 contents (80.8%), 24 errors, remaining 5h44m49s, ETA 2026-11-09 22:43:25 CET
  Verified 551522 of 651652 contents (84.6%), 24 errors, remaining 4h23m48s, ETA 2026-11-09 21:22:27 CET
Finished verifying contents
Finished verifying contents
verifyCounters:	{"verifiedContents":651652,"totalErrorCount":24,"contentsInMissingPacks":24,"contentsInTruncatedPacks":0,"unreadableContents":0,"readContents":651628,"missingPacks":4,"truncatedPacks":0,"corruptedPacks":0}
missingPack	{"packID":"p4d48d5d877a4f19a1a64f6393fa37a96-s769e811c258a6bcf143","numberOfReferencedContents":1}
missingPack	{"packID":"p7bba4d14f5826b8c998a9301441ccc62-s7e834091e91ead2b143","numberOfReferencedContents":10}
missingPack	{"packID":"p5dcb5a31fef8f17d69dea6f8158965b2-s6c742747e105d3ac143","numberOfReferencedContents":1}
missingPack	{"packID":"pbf417990b0e904a1ea52371da838f11f-s7e834091e91ead2b143","numberOfReferencedContents":12}
verify contents: encountered 24 errors: the repository is corrupted, it is missing pack blobs with index-referenced content

First think I noticed: The verify process seems to have stopped prematurely

Verified 551522 of 651652 contents (84.6%),..

is the last line before the summary. 100k contents have not been verified, have they?

Next step(s)

How do I use this list of missing blobs to get a list of files concerned? I don’t have good enought an understanding of the individual files written by kopia to sort this out.

So I tried doing what NiklausHofer did in the github issue linked by @dimejo. No luck there however, I can’t seem to delete, or delete mentions of the corrupted/missing blobs from my repo.

kopia content verify  --include-deleted --full
Listing blobs...
  10000 blobs...
  20000 blobs...
  30000 blobs...
  40000 blobs...
  50000 blobs...
  60000 blobs...
Listed 60465 blobs.
Verifying contents...
content 16ac4cbd74d63c8efa70a902602fb0ec depends on missing blob pe1521cc085f7b8019ddc344005190665-s5be91b0a2c103ffe139
content 1e58cf9e7eff2b9b5feb6058dfc650dd depends on missing blob pe1521cc085f7b8019ddc344005190665-s5be91b0a2c103ffe139
content 28cbb7c68978f2dc946ee11e2b12cbde depends on missing blob pe1521cc085f7b8019ddc344005190665-s5be91b0a2c103ffe139
content 3c6a3c860e98c1c73d3d7d60cb5b5ccb depends on missing blob pe1521cc085f7b8019ddc344005190665-s5be91b0a2c103ffe139
content 423e408e2ac3f36db074441942eeef91 depends on missing blob pe1521cc085f7b8019ddc344005190665-s5be91b0a2c103ffe139
content 8bbce0fe6b2d73a5bc616f33f6335ef4 depends on missing blob pe1521cc085f7b8019ddc344005190665-s5be91b0a2c103ffe139
content aea0ca75c8d6d4e94301d1d1e34e44e2 depends on missing blob pe1521cc085f7b8019ddc344005190665-s5be91b0a2c103ffe139
content be8fbf90aed00bc5af605675df6e951d depends on missing blob pe1521cc085f7b8019ddc344005190665-s5be91b0a2c103ffe139
content fa9bc35111d4a4cd36da6fc731294e8c depends on missing blob pe1521cc085f7b8019ddc344005190665-s5be91b0a2c103ffe139
content m7f0a299b3de0b6d779f7662a4b53f49b depends on missing blob q45285b794b6574ebebf0419e1d3c6e52-s95540f88e181dd9c143
Finished verifying contents
verifyCounters:	{"verifiedContents":1386367,"totalErrorCount":10,"contentsInMissingPacks":10,"contentsInTruncatedPacks":0,"unreadableContents":0,"readContents":1386357,"missingPacks":2,"truncatedPacks":0,"corruptedPacks":0}
missingPack	{"packID":"q45285b794b6574ebebf0419e1d3c6e52-s95540f88e181dd9c143","numberOfReferencedContents":1}
missingPack	{"packID":"pe1521cc085f7b8019ddc344005190665-s5be91b0a2c103ffe139","numberOfReferencedContents":9}
verify contents: encountered 10 errors: the repository is corrupted, it is missing pack blobs with index-referenced content

At the very least, this seems to be a problem with my specific repo, not the files I am uploading to the repo, since I have a mirror repo on a different drive that does not have these issues.