GITLAB file restore issue

Hi,
I am so confused and don’t know what to do.
I configured my Gitlab locally on ubuntu 18.02 and upload my projects there.
Now, I got a problem in my ubuntu O.S, so I needed to fresh install Ubuntu.
In this case, I make a copy of the /var/opt/gitlab/ dir and install a fresh version of ubuntu.

The main issue here is that how can i restore the repository back to my Gitlab?
I search for .pack extension files and check that all the files are in compressed form.

I search for help on how to get back the source files from here but no way…

Please help me in this regard.

Thanks

Hi @muhammad.sajjad,

Do you still have access to the original GitLab installation?
If so, the best path forward will be to create a backup of GitLab on the old machine and restore the backup on the new machine.

If all you have is a copy of /var/opt/gitlab/git-data/repositories, you can create new projects on the new instance and git push each from /var/opt/gitlab/git-data/repositories/<repo_name>.

1 Like

Thanks dear,
I will check with that.