need help with syncing two bare repos

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]