Hi,
> Hi,
> During `bup fsck -g` I see several messages in the form of
>
> ```
> Could not create "/mnt/diskstation/backup/bup_backup/objects/pack/pack-c13f3f8800a857bf56c23afa7ec97f9c9bce3ba6.par2": File already exists.
> pack-c13f3f8800a857bf56c23afa7ec97f9c9bce3ba6 par2 create: failed (6)
> ```
>
> with different hashes.
Hmm. That's weird, not sure why that happens. But it should be
reasonably harmless.
> This then results in about 100 errors in the form of
> ```
> error: inflate: data stream error (incorrect data check)
> fatal: pack has bad object at offset 534116960: inflate returned -3
> pack-cb5543a5bca733bfa874aef8d15eebae80b53d6c git verify: failed (1)
> ```
>
> with different hashes as well.
This is problematic.
> Deleting the file .par2 file doesn't fix the issue.
Obviously. I hope you didn't actually *delete* them but merely moved
them out of the way, because the whole idea of the par2 files is that
you can recover from errors like that in your backup.
> Should I consider my backup damaged? And thus delete and recreate it?
> Or is there a way to fix this?
If you still have the par2 files for the pack files in question, then
I'd probably start by doing something like
par2verify pack-cb5543a5bca733bfa874aef8d15eebae80b53d6c.pack.par2
(not sure about the exact filename) to see what par2 has to say about
the data there. If git says it's bad though chances are that it really
_is_ bad and you'd want to "par2repair" (or even "bup fsck --repair")
it. After making copies I guess :)
If you actually deleted the par2 files then I'm afraid you just deleted
the chance that you had to actually recover those errors. You could
figure out which objects were supposed to be at that location (from
git's "fatal: pack has bad object at offset 534116960" message) from the
corresponding idx, but then with that information you'd have to figure
out where exactly that object is used in the backup, etc. It's
_possible_ but not really easy, and I don't think there are currently
any tools for it. You could also try to re-hash all of your files to see
if an object with this sha1 shows up... again, no tools.
Unless you can repair it using par2 data, I'd definitely recommend you
stop backing up into this repository as bup will think the object(s)
that is (are) broken is (are) still there, and will not save it (them)
again. This might make even your current backups bad.
If you have enough space, keep this backup repo around and make a new
one. If you don't have enough space, you could make a new repo and move
(since you don't have space to copy) the packs that are still intact
according to git/par2 into it. These will just stick around as-is, and
if you really really need to restore some old files, you'd still be able
to do that, subject to whatever holes might be poked into them by the
bad objects.
Obviously, if you really don't care about the old backups after you've
made a new one (provided you had enough space) you can also just throw
the old repo away ...
johannes