git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Recovering from epic fail (deleted .git/objects/pack)

From
RBR. Tyler Ballance <tyler@slide.com>
Date
Dec 10, 2008, 10:06 UTC
Message-ID
<1228903606.4445.53.camel@starfruit.local>
In-Reply-To
<7vd4g051ax.fsf@gitster.siamese.dyndns.org>
On Tue, 2008-12-09 at 16:19 -0800, Junio C Hamano wrote:
Show 9 quoted lines
> I do not know about "feasible" and "properly", but ...
> 
>  (0) take backup of the repository of this unfortunate developer.
> 
>  (1) make a fresh clone of the central repository that this unfortunate
>      developer's work started out from.
> 
>  (2) copy the contents of the .git/objects/pack/ of that clone to the
>      developer's .git/objects/pack/.

This approach "sort of" worked, i.e. it worked insofar that I was able to use the repository enough to generate a series of patch files for the developer's work from the last two weeks to be applied to their new clone of the central repository. Why I did this is answered below ;)

> 
> See if "fsck --full" complains after that.  If the repository was not
> repacked during that period, all objects created by the activity by the
> unfortunate developer would be loose, so ...

tyler@ccnet:~/source/slide/brian_main> time git fsck --full Segmentation fault

real 27m2.187s user 10m3.238s sys 0m16.609s tyler@ccnet:~/source/slide/brian_main>

Oh well, your approach worked *enough* to get the important data out, and that's what's most important.

Moving forward we're likely going to implement an automated process of walking through developers' repositories and pushing any unpushed refs to a backup repository just to make sure something like this doesn't happen again.

Appreciate the help :)
Cheers
-- 
-R. Tyler Ballance
Slide, Inc.
Previous: Junio C HamanoNext: Johannes Sixt
Message 3 of 22 in “Recovering from epic fail (deleted .git/objects/pack)”
  1. R. Tyler BallanceDec 10, 2008
  2. Junio C HamanoDec 10, 2008
  3. R. Tyler BallanceDec 10, 2008
  4. Johannes SixtDec 10, 2008
  5. epic fsck SIGSEGV! (was Recovering from epic fail (deleted .git/objects/pack))R. Tyler Ballance, Dec 10, 2008
  6. Linus TorvaldsDec 10, 2008
  7. R. Tyler BallanceDec 11, 2008
  8. Linus TorvaldsDec 11, 2008
  9. R. Tyler BallanceDec 11, 2008
  10. Junio C HamanoDec 11, 2008
  11. Boyd Stephen Smith Jr.Dec 11, 2008
  12. Shawn O. PearceDec 11, 2008
  13. Nicolas PitreDec 11, 2008
  14. Junio C HamanoDec 11, 2008
  15. Nicolas PitreDec 11, 2008
  16. Linus TorvaldsDec 11, 2008
  17. Linus TorvaldsDec 11, 2008
  18. Junio C HamanoDec 11, 2008
  19. Linus TorvaldsDec 11, 2008
  20. Linus TorvaldsDec 11, 2008
  21. Junio C HamanoDec 11, 2008
  22. Boyd Stephen Smith Jr.Dec 11, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.