Skip to content

Support moving a repo from one gitserver instance to another

Created by: ryanslade

Update 2021-10-22

This issue is now a tracking issue (kind of) as we've moved discussion about a plan in GitHub discussion #26416 and created issues for individual work for this larger effort and are mentioned below.


We need a method, possibly on our gitserver client that can move a repo from one node to another.

It should:

  1. Clone the repo on the new node
  2. Remove it from the old node
  3. Update gitserver_repos
  4. Report whether either of the above steps failed

We should investigate the effort required in cloning from the old address so that we don't rely on cloning from the external service although it's not a blocker.

This should be implemented to support our migration to rendezvous hashing: https://github.com/sourcegraph/sourcegraph/issues/25036