Gitlab import raw data

Hi I just installed a new gitlab server (on a debian according, cause the old could not be recovered.
I have set up a new one and everything is ok, except the repositories.
I only have a backup from the git-data directory. Previous server was setup with omnibus from and was an old v10.4
The new one is now on v13.5.1
I already tried this method, but with no luck.
Does anyone have some tips how to get that data into the repository of my new server?

I think probably your best bet, is something like this:

  1. In web interface create new project/group to replicate how it looked before.
  2. Clone this new empty repo to your machine.
  3. Move the files for the old project with the same name, into the newly cloned directory.
  4. git add, git commit and git push.

then repeat for all remaining projects. Of course, if you have a lot of projects, then it will be a lot of manual work, but don’t really see any other way of doing this to be honest.

Hi Ian,

Thx for your reply.
The older version did not use hashing repositories, this one does.
I tried the following approach. I copied all namespaces from git-data on a separate server with another domain name. Then on create project -> import project -> I used Repo by URL
Couppled it back on the new namespace, et voila.
That worked fine!

1 Like