git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mirror git repos: rsync vs. --mirror
@ 2010-03-30 20:54 Robin H. Johnson
  2010-03-30 22:00 ` Julian Phillips
  0 siblings, 1 reply; 4+ messages in thread
From: Robin H. Johnson @ 2010-03-30 20:54 UTC (permalink / raw)
  To: Git Mailing List

I'm trying to see about the state of automated mirroring git
repositories between different systems, eg. a private backend and a
public frontend, and ran into a catch between two possible options, each
with a downside. If there are other means besides these, I'm all ears
for them.

rsync:
------
How:
- Simply rsync the git repository, atomically, and use --delete-after.
Benefits:
- Guaranteed to match between master/slaves.
Caveats:
- Need to know that the master repo is in a good state.
- If a repo is repacked, there is a lot more traffic in the next sync.

git clone --mirror && git fetch:
--------------------------------
How:
- Setup with: "git clone --mirror URL"
- Cronjob with: "git fetch"
Benefits:
- Extremely fast
- Light on traffic
Caveats:
- Branches and tags deleted in master persist in slaves :-(
- Seperate gc/repack needed on slaves.

The traffic vs. deleted branches/tags is the main tradeoff here, esp. as
repos get larger.

Can git-fetch perhaps be made to delete the branches/tags?

-- 
Robin Hugh Johnson
Gentoo Linux: Developer, Trustee & Infrastructure Lead
E-Mail     : robbat2@gentoo.org
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-03-31  3:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-30 20:54 mirror git repos: rsync vs. --mirror Robin H. Johnson
2010-03-30 22:00 ` Julian Phillips
2010-03-31  1:44   ` Sitaram Chamarty
2010-03-31  3:05     ` Robin H. Johnson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).