Git mirroring/clone multisite


I have a GitLab CE server in US. and Jenkins server in India.
Ideally users commit to Gitlab server in US. Periodically Jenkins pulls down code and triggers a build.
Due to the network lag this is taking long for the source code to transfer from US to India and delaying the work.

Solution 1: We are think of this solution not sure if this will work.
Have a Gitlab server in India and clone all the repos in the US server to India server (mirror)
Run some script or fetch code from US server periodically update the India server.
Connect Jenkins to India Gitlab server and pull code and build.
Request members to please let me know if this can be possible. Or suggest a better solution.

@axil @kelvinmutuma

Thank you !!

Hi Ershad,

Did you implement this change, We are also in need of same implementation. Can you help me out. I will contact you. Please give me your email id and phone number, I will reach out to you


Hi Prashanth
My profound apologies for the delayed response. We had a gitlab upgrade so I was working on that.
The main issue we faced was the lag in accessing the data from India Gitlab server by the US users. Initially we planned to implement the mirroring. Since its long process and was not tried by any one so we had to look for other possible ways to solve this problem.

  1. We were running Daily rake-backup at night time which was taking all the system resources during the backup file creation(rar). The backup file was 60 GB out of which 58 GB was repositories.
  2. So we modified our rake-backup , used SKIP=repositories option in rake backup command, it will backup everything except repositories, we put repos folder in incremental backup separately we use TSM tivoli storage mgr.

This resolved the slowness problem to a great extent.

Regarding Gitlab mirroring there is some documentation which you can go through.
If you are doing it on a Gitlab EE server then you will have support from GitLab.