Greg Troxel <
g...@lexort.com> writes:
> Obviously in general:
>
> make backups onto multiple disks, so the loss of any one is not a big
> deal (I do)
I don't do it right now, but I suppose possibly even safer if it's
feasible (though extra work), to run save twice, to two destinations.
That way you wouldn't propagate any (hypothetical) problems in the first
save when copying repo files.
> use par2 (I don't but probably should; anecdata about par2 rescues
> would be interesting)
I'm not sure I've needed the par2 files yet, but we do test it a bit in
make check iirc.
> It seems I should be able to write the bad blocks with zeros in the
> underlying disk, turning them into forwarded blocks of zero vs read
> error. That will change the packfile from "can't read" into "some
> bytes are zero when they weren't".
Ideally, if you know what packfile contains the bad block(s), you may be
able to rewrite that packfile, dropping any affected objects. I think
that should be possible, though not sure whether the existing git tools
can help you do it easily, i.e. can they keep going after an error,
etc.?
After that, you might have "dangling pointers", which I think git (fsck
--dangling?) should be able to find/report. To patch those up, you'd
either have to backfill them via new saves (after clearing midx and
bloom), if the relevant files are still available, or perhaps manually
replace the trees/commit objects that refer to them with ones that refer
to an empty file instead, or...
One (expensive) way to check that a tree isn't missing anything:
bup join COMMIT_HASH > /dev/null
Though that might only check the data, i.e. it may not try to resolve
the .bupm files.
Hope this helps.
--
Rob Browning
rlb @
defaultvalue.org and @
debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4