Gitlab: Difference between revisions

Onny (talk | contribs)
Add notes on Gitlab behind reverse proxy
Silver (talk | contribs)
Improved the docs on migration to nixos hosted gitlab.
Line 73: Line 73:
Then install a Gitlab on the NixOS. Make sure you set the same secrets like on the old installation.
Then install a Gitlab on the NixOS. Make sure you set the same secrets like on the old installation.


After a successful deploy, stop the Gitlab service using systemctl stop.
After a successful deploy:
Then copy the backup *_gitlab_backup.tar on the new server and run sudo -u gitlab gitlab-rake gitlab:backup:restore BACKUP=<name before the _gitlab_backup.tar>. You will be interactively asked what should be done.


After that, start the Gitlab Service again using systemctl start.
# Stop the Gitlab service using <code>systemctl stop gitlab.service</code>.
# Start Gitaly <code>systemctl start gitaly.service</code>
#* It gets stopped when gitlab.service stops.
# Then copy the backup *_gitlab_backup.tar to the backup folder
#* <code>cp 1719619965_2024_06_29_16.11.4_gitlab_backup.tar /var/gitlab/state/backup</code>
# Run <code>sudo -u gitlab gitlab-rake gitlab:backup:restore BACKUP=<name before the _gitlab_backup.tar></code> .
#* For example <code>sudo -u gitlab gitlab-rake gitlab:backup:restore BACKUP=1719619965_2024_06_29_16.11.4</code>
# You will be interactively asked what should be done.
#* You will most likely be saying yes hrtr
# Start the Gitlab Service again using <code>systemctl start gitlab.service</code>.
 
You may need to rebuild the system for everything to properly come up.


== Troubleshooting ==
== Troubleshooting ==