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

Re: how to backup git

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
May 12, 2008, 15:08 UTC
Message-ID
<alpine.DEB.1.00.0805121606010.30431@racer>
In-Reply-To
<48285087.3090402@gmail.com>
Hi,
[please do not cull the Cc: list]
On Mon, 12 May 2008, bill lam wrote:
Show 8 quoted lines
> Johannes Schindelin wrote:
> > > I'd rsync just the .git directory.
> 
> Thanks to all responders for quick reply. I still have a related 
> question. svn has a hotcopy command to ensure integrity so that it is 
> possible to backup without shutting down the svn server. If someone 
> update the .git while I am performing backup using tar or rsync? Will 
> the atomicity of that commit still preserve in my backup copy?
No, rsync is particularly dumb in that respect.  The safest thing would be 
to back up the reflogs first (e.g. with rsync), then repack and then clone 
(the clone will transmit the objects referenced by the reflogs, too).  
Note: the same holds _not_ true for a simple fetch.

But then, you usually do not want to back up reflogs anyway, since they are purely local and not visible to anybody else.

Ciao, Dscho

Previous: Miklos VajnaNext: Heikki Orsila
Message 8 of 21 in “how to backup git”
  1. bill lamMay 12, 2008
  2. Tobias SarnowskiMay 12, 2008
  3. Sverre Hvammen JohansenMay 12, 2008
  4. Eric HanchrowMay 12, 2008
  5. Johannes SchindelinMay 12, 2008
  6. bill lamMay 12, 2008
  7. Miklos VajnaMay 12, 2008
  8. Johannes SchindelinMay 12, 2008
  9. Heikki OrsilaMay 12, 2008
  10. Johannes SchindelinMay 12, 2008
  11. Heikki OrsilaMay 12, 2008
  12. Johannes SchindelinMay 12, 2008
  13. Heikki OrsilaMay 12, 2008
  14. Heikki OrsilaMay 12, 2008
  15. Tim HarperMay 12, 2008
  16. Heikki OrsilaMay 12, 2008
  17. Sverre RabbelierMay 12, 2008
  18. Jakub NarebskiMay 12, 2008
  19. Daniel BarkalowMay 12, 2008
  20. Junio C HamanoMay 12, 2008
  21. Daniel BarkalowMay 12, 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.