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:

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 !