Synchronize two gitlab-ce servers

Hello everyone !

I wanted to know if it was possible to synchronize two gitlab-ce servers ?

By that, I mean that as soon as I modify something on one server, the modification also applies on my other server.

Thank you in advance :slight_smile:

1 Like

Hi @WhiteRose!

The best solution will depend on what your goal is.

What is the purpose or intention for this setup (high availability, redundancy/backups, multiple geographic locations, disaster recovery/automatic failover, other)?

Thanks for your answer @gitlab-greg

The purpose of this setup is to keep synchronized the same projects of two different servers. Meaning that it must have high availability atleast. Pushing on a project on server A will have to push on the same project on server B or server B will have to pull ( is it really important which one I choose ? ).

The mirroring also have to be bidirectionnal. Does it involve conflicts ?

Also, the two gitlab servers are located on two differents architectures (proxies, VPN tunnels, etc…). Is it possible to configure those access in order to do those mirrorings through SSH with public key authentication ?

Hi @WhiteRose,

Thanks for the clarification.

If bidirectional mirroring is not a hard requirement, I’d suggest using a Single replica server.

Another solution would be to use multiple application servers that share an external filesystem, redis, and postgres nodes.

A third solution would be to upgrade to a GitLab EE Premium plan to take advantage of Geo replication

Keep in mind that all Highly Available solutions come with a trade-offs involving cost, complexity, maintainability, and uptime.

The simplest and cheapest solution would be to set up two instances with Push mirroring set up for all projects on one of the servers.

1 Like

Thank you very much for your answer !

I’ll go for two instances with push mirroring, seems a lot easier !

hello everybody,
I have a problem I’d like to solve as soon as possible.
I’m working on a project and I have several servers that contain the same project, and each time I make changes to the code etc… now I’m looking for a solution so that when I push from my computer, everything syncs with all the other multiple servers. What can I do to solve this problem? Is gitlab a good idea?

If you only need one-way synchronization, I suggest using Push mirroring . This is relatively easy to set up and is used to copy changes in one project over to a “mirror” of that project on another server.