From: Eugene Sajine <euguess@gmail.com>
To: git@vger.kernel.org
Subject: need help with syncing two bare repos
Date: Fri, 3 Aug 2012 14:29:44 -0400 [thread overview]
Message-ID: <CAPZPVFax6wa9QYOMxghhWK6LJaYWS2+WCbWQLA+LE53TdNXJhQ@mail.gmail.com> (raw)
Hi,
Could somebody please advise about how to address the following:
I have a bare repo (bareA) on one server in network1 and i have a
mirror of it on another server (bareB) in network2
BareB is updated periodically - no problem here
If bareA dies users are supposed to move seamlessly to bareB.
When bareA goes back up users are moved back but before it starts
serving repos (before git-daemon starts) it updates from bareB.
Now the problem i have is if bareA doesn't actually die, but the
connection between two networks drops.
In this case users from network2 will stop seeing bareA, they will
start working with bareB, while users in netwrok1 will continue
to work with bareA.
What would be the best way of syncing the bareB back to bareA when
connection is restored?
I think the best variant would be to do something like:
$ git pull --rebase /refs/heads/*:/refs/heads/*
$ git push origin /refs/heads/*:/refs/heads/*
but pull will not work on bare repos as i understand and there might
be conflicts that will lead to unknown (for me) state of bare repos
May be I'm looking into wrong direction? May be simple two way rsync
will do the job? But I'm a bit reluctant to rely on rsync because I'm
afraid it may screw up the repository information.
Any ideas are much appreciated!
Thanks,
Eugene
next reply other threads:[~2012-08-03 18:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-03 18:29 Eugene Sajine [this message]
2012-08-03 19:14 ` need help with syncing two bare repos Sitaram Chamarty
2012-08-03 20:00 ` Junio C Hamano
2012-08-03 20:31 ` Eugene Sajine
2012-08-03 21:34 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPZPVFax6wa9QYOMxghhWK6LJaYWS2+WCbWQLA+LE53TdNXJhQ@mail.gmail.com \
--to=euguess@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).