0
votes

I have Gitlab CE on my CentOS 7 server along with Jetbrains Teamcity. While updating TeamCity, it asked me to upgrade git to version higher than 2.1.0, because after the update it will not work with versions prior to 2.1.0. So I updated it as shown in [here][1]

after installation of a newer version of git (2.24.1), my Gitlab stopped working. I think the step sudo yum remove git* removed not only my git but binaries of my GitLab. Because now there is no bin folder in /opt/gitlab/embedded/ path (where gitlab-ctl gitlab-rake etc were kept).

The automatic backups were not set up, the /var/opt/gitlab/backups/ folder is empty. How do I restore my GitLab, without losing my repositories and configurations?

PS this far I have backed up:

  1. /opt/gitlab -> /opt/gitlab-backupd
  2. /var/opt/gitlab -> /var/opt/gitlab-backupd
  3. /etc/gitlab -> /etc/gitlab-backupd

And I want to run yum install gitlab-ce, but I'm afraid that I'll lose my repositories. [1]: https://computingforgeeks.com/how-to-install-latest-version-of-git-git-2-x-on-centos-7/

1

1 Answers

0
votes

Posting an answer, in case if it helps anyone.

So, I went ahead and ran the install command, which did NOT remove any of existing data. However it did not run, neither did it reconfigure. gitlab-ctl status showed that postgres was down.

Turns out yum install gitlab-ce installed latest version (13.4 at the time of writing), which was incompatible with existing embedded postgres version (9.6). I had to find which version was installed previously and install desired version - 10.4.2 (changelog can be found here)

Finally after installing the compatible version, setting up and running it - it was giving me the 502 error. gitlab-ctl tail showed that server denied access on /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket file. After deleting the file, everything was up and running).