Re: rsync busy non-bare git repo 'source' to quiet
- From
Jeff King <peff@peff.net>
- Date
- Mar 8, 2011, 22:38 UTC
- Message-ID
- <20110308223841.GA6648@sigill.intra.peff.net>
- In-Reply-To
- <4D76ABB1.9080001@gmail.com>
On Tue, Mar 08, 2011 at 04:20:33PM -0600, Neal Kreitzinger wrote:
> Rsync seems like a simpler solution and more accurate solution for > creating a copy of an ecosystem of interrelated git repos colocated on > the same box.
Sure. It is simpler, but not atomic unless you do a multi-stage rsync.
Show 9 quoted lines
> A previous post in the newsgroup states: > > If you want your rsync backup to be fine, you need to follow some > >ordering. You need to copy the refs first (.git/packed-refs and > >.git/refs/), then the loose objects (.git/objects/??/*), and then all > >the rest. If files are copied in a different order while some write > >operations are performed on the source repository then you may end up > >with an incoherent repository." > > Would that work?
If you do it in that order, the end result will be a consistent repo. But during the copy, the refs at the destination will point to objects you don't have. I don't know if that matters for your case.
-Peff