Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prune error "Error: used pack 00b1373b does not exist!" #249

Closed
thht opened this issue Oct 7, 2022 · 13 comments
Closed

Prune error "Error: used pack 00b1373b does not exist!" #249

thht opened this issue Oct 7, 2022 · 13 comments

Comments

@thht
Copy link

thht commented Oct 7, 2022

hi,
when i prune my repo after a successful backup, I get the following error:

Error: used pack 00b1373b does not exist!

What does this mean? Do I need to fix this? If yes, how do I fix this?

Thanks!"

@aawsome
Copy link
Member

aawsome commented Oct 7, 2022

Seems you are missing this pack file. Can you run rustic check - it should give you the same error.

What version of rustic and which backend are you using? Before #230 (which is so far only included in the beta builds) it could happen that a upload via rclone or rest failed but the backup command doesn't retry or report an error. This bug fix needs to be released, but I was unfortunately a bit busy the last days...

@thht
Copy link
Author

thht commented Oct 7, 2022

I am running the latest stable version 0.3.1 and use the rclone s3 backend.

but if i understand it correctly, as soon as you have published the new version, rustic should detect the missing pack file during a backup run and just create and reupload it. correct?

@aawsome
Copy link
Member

aawsome commented Oct 7, 2022

Ok. Sorry that I didn't manage to release the bug fix earlier.
Unfortunately it will not suffice to just re-run the backup. So far this missing pack file is contained in the index and therefore the backup command will think the data is already there when you re-do a backup.

So, the index needs to be rebuilt - I planned to add a --repair-index option to the check command to do this. There are different cases how an index must be repaired where removing packs which are not present is the simplest one. So I'll just start with this "repair" option.

After the index is corrected, a consequent backup heals the repo - IF all data which is missing in the repository is still available in the backup source.

@aawsome
Copy link
Member

aawsome commented Oct 7, 2022

Another possibility for you to heal the repository is to to simply forget the snapshot you just made and then run prune. This should then also remove the missing pack from the index (but also the data that was added by that snapshot)

@thht
Copy link
Author

thht commented Oct 7, 2022

no worries!

actually, the check command returns three packs that are in the index but not present.

is there a way to know which snapshots they belong to so i now what to forget and prune?

@aawsome
Copy link
Member

aawsome commented Oct 7, 2022

is there a way to know which snapshots they belong to so i now what to forget and prune?

No, unfortunately not. At this point the check command only checks the index independent of existing snapshots.

@thht
Copy link
Author

thht commented Oct 7, 2022

would i be able to use restics rebuild-index to fix my repo?

@thht
Copy link
Author

thht commented Oct 7, 2022

keeping in mind that it is a hot/cold storage style repo...

@aawsome
Copy link
Member

aawsome commented Oct 7, 2022

restic rebuild-index should work. However, not if you are using this on cold repositories as they are not supported with restic.
Also some features like the lock-free pruning or the prune --keep-pack option won't work after your index has been written by restic.

I'll soon implement the same functionality in rustic.

@thht
Copy link
Author

thht commented Oct 7, 2022

Ok. Thanks for the info! I'll wait for the update.

Thanks by the way for this project and your super quick responses!

@aawsome
Copy link
Member

aawsome commented Oct 7, 2022

All right and thank you for your feedback 😄 .
Il close this issue as the error you got is most likely already fixed by #230.

@aawsome aawsome closed this as completed Oct 7, 2022
@aawsome
Copy link
Member

aawsome commented Oct 7, 2022

In #255 I implemented a repair command which should help you to repair your repository.
With that PR you can run rustic repair index to remove the missing pack files from the index.

Then, another run of rustic check will show you which blobs are actually missing and which files these blobs belong to. Another backup of these files (if they didn't change meanwhile) will heal your repo.

@aawsome
Copy link
Member

aawsome commented Oct 11, 2022

#255 has been merged. So, you can also run rustic repair index using the latest beta build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants