restic: Fatal: number of used blobs is larger than number of available blobs
Also having a lot of errors when doing a restic check
Output of restic version
restic 0.9.6 compiled with go1.13.7 on freebsd/amd64
How did you run restic exactly?
restic prune
variables:
set -gx AWS_ACCESS_KEY_ID secret
set -gx AWS_SECRET_ACCESS_KEY secret
set -gx RESTIC_HOME $HOME/.config/restic
set -gx RESTIC_PASSWORD_FILE $RESTIC_HOME/etc/pass
set -gx RESTIC_INCLUDE $RESTIC_HOME/include
set -gx RESTIC_REPOSITORY s3:https://secret/bkup
I don’t remember which variables are used for restic but here are the ones I’ve set for myself.
What backend/server/service did you use to store the repository?
AWS
Expected behavior
I expected prune to prune the data
Actual behavior
[~]$ restic prune
repository 3a6e47e7 opened successfully, password is correct
counting files in repo
building new index for repo
[17:12] 100.00% 150137 / 150137 packs
repository contains 150137 packs (676019 blobs) with 718.767 GiB
processed 676019 blobs: 0 duplicate blobs, 0 B duplicate
load all snapshots
find data that is still in use for 23 snapshots
[0:32] 100.00% 23 / 23 snapshots
Fatal: number of used blobs is larger than number of available blobs!
Please report this error (along with the output of the 'prune' run) at
https://github.com/restic/restic/issues/new
I was prompted to file this ticket
Steps to reproduce the behavior
restic prune
Do you have any idea what may have caused this?
no idea. the tool told me to file the issue
Do you have an idea how to solve the issue?
none
Did restic help you today? Did it make you happy in any way?
it makes me happy almost every day
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 4
- Comments: 17 (9 by maintainers)
I managed to repair the repository. I followed the instructions found on the forum. 1/ find the id of the tree with errors with the commande “restic check” 2/ find the id of the snapshot containing this tree with “restic find --tree <id of the tree with errors>” 3/ Delete the snapshots with “restic forget” 4/ Prune the repository with “restic prune” I do not have the error anymore.
PS : Maybe this can be automated with a sort of “repair” commande ?
Thanks for the information, I wasn’t aware of that. But I had assumed people would skim through old issues before opening a new one.
Running
restic rebuild-indexandrestic prunemakes sure that restic cleans any incomplete parts which couldn’t be restored anyways.FYI, it looks like the discussion continued in this thread in the forum.
I ran
restic rebuild-indexand it didn’t improve or make things worse . I think it’s safe to try itJFTR (@dimejo):
restic prunestates:Following the given link opens a new issue without a template.
resticshould instead show this or Bug report?