Gitlab Data

Good Day, hope you can assist me … I have a new server DR and followed the this link for the install - Download and install GitLab | GitLab
Every step worked fine until I got to this step - Add the GitLab package repository and install the packages

Was getting issues trying to get to the site(Curl was failing) so as plan B I decided to get the Gitlab ce image from a different server via nexus and pull it onto my DR server and that worked. I managed to start the container and Gitlab via this command

Sudo podman run --detach
–hostname my hostaname
–publish 443:443 --publish 80:80 --publish 22:22
–name gitlab_ce
–restart always
–volume $GITLAB_HOME/config:/srv/gitlab
–volume $GITLAB_HOME/logs:/srv/log/gitlab
–volume $GITLAB_HOME/data:/srv/gitlab/data
–env GITLAB_CONFIG=“external_url ‘’;”

So far it seems all is working I’m able to enable features in side the gitlab.rb file etc, So we wanted to restore the data from backup , we backed our gitlab onto S3 and we mounted the backup on the new DR server and restored the data fine , extracted the data onto the directory as per the git-data inside the gitlab.rb path and restarted the container.

But we can’t seem to get all the repos across . I suspect permissions so i tried to run the chown git:git for the directory but I got invalid user , tried to run the rake command and that failed cause rake is not a valid command (might be because of the route we used to install gitlab image).

I cannot figure out what I did wrong not to get the repos, also the new project/group created in the new instance i get 'no repository ’ when i check the path.

Any ideas, assistance would be much appreciated.

Hi @Chiefshole

Have you used the gitlab-backup command to backup and restore? Here is the official guide.

If you are in disconnected environment you can download GitLab packages manually - gitlab-ce or gitlab-ee
Then you can run yum localinstall or maintain your own RPM repository in nexus and upload it there.

If using the official container image there are actually couple things you need to keep in mind.
For SELinux enabled servers, you have to specify z or Z in volume mounts. See here for details.
If you are not running podman as root you have to deal with user-namespaces and subuid/subgid.
You have actually defined env variable $GITLAB_HOME on your host.
All steps should be done from within the container itself. You can either do it from interactive shell podman exec -ti gitlab_ce /bin/bash or commands like podman exec gitlab_ce chown -R git:git /srv/gitlab/data/git-data.

Any reason why you are not using the default paths for data, logs and config inside the container?

Hi @balonik
Have you used the gitlab-backup command to backup and restore? - We had backups on the old version and I don’t think they used gitlab-backup utility, we have a RHEL machine so we started on a clean slate but still will do the backups on the new version going forward.
So the plan is to copy the data across from S3 and mount the drive on our DR machine to pull through the data for testing… Reason for that is that users can reuse their data and not start from scratch…

So we wanted to follow the guide an install for Docker/Podman but we struggled getting the Curl command to work which would have brought the packages across so the next plan the was to get the image via nexus (was not happy with that) but we had to get the image and start the config.

I will use the podman exec gitlab_ce chown -R and test again (Thanks again for all the information)

I cannot remember why I stuck to SRV instead of VAR , no specific reason for that . Will that affect the config? or is it a preferences to use the defaults?