Asif Ahmed
Asif Ahmed

Reputation: 11

Gitlab migration from older version to new version

I am trying to migrate the entire repository from server A to Server B. The current gitlab in server A is running in Version:7.7.2 , and Server B is running in Version:12.2.4

What is the best way to migrate the entire repositories from server A (Version:7.7.2) to server B (Version:12.2.4).

Upvotes: 1

Views: 2502

Answers (2)

DUDEZKIE
DUDEZKIE

Reputation: 415

First Create backup in your Server A, along with the config and secrets.

Then install the same gitlab server in Server B, copy the backup from Server A to Server B, restore backup and place the config and secrets where the exact location it is suppose to be from Server A.

Then test the Gitlab in Server B if all is working well.

Then curl download the list of new version of gitlab in server B

Run

apt update gitlab-ee or gitlab-ce -y

Done.

Upvotes: 0

Drew Blessing
Drew Blessing

Reputation: 2705

The easiest way is to update your remote on your local workstation and push the code to the new GitLab server. Here are the steps:

  1. Clone the project to your local workstation if it isn't already: git clone --mirror [email protected]:group/project.git
  2. Create the new project in the new GitLab server.
  3. Copy the clone URL from the new project in the new GitLab server.
  4. Add a new remote to your checked out repository: cd project (from earlier clone). Then, git remote add new-gitlab <clone_url_from_new_server>
  5. Push to the new server: git push new-gitlab --mirror

There's a decent post about how to 'mirror' a project at http://blog.plataformatec.com.br/2013/05/how-to-properly-mirror-a-git-repository/

Upvotes: 2

Related Questions