Gitlab backup


To backup Gitlab data use following command:

gitlab-rake gitlab:backup:create

This command will backup backup date in  path /var/opt/gitlab/backups/

To exclude any directories from backup use following command:

gitlab-rake gitlab:backup:create SKIP = db,uploads

Above command will exclude db & upload directories.


Get gitlab version number from Gitlab cli


To get Gitlab & other dependent modules version numbers use the following command:

gitlab-rake gitlab:env:info

The output will include all details like Gitlab version, git version, git shell version, OS version, Ruby version, Gem version, Bundler version, Rake version, Redis version, Sidekiq version & etc…

Gitlab with non-standerd ssh port


To user non standerd ssh port with gitlab use following procedure:

Open /etc/gitlab/gitlab.rb and add following line:

gitlab_rails['gitlab_shell_ssh_port'] = 4321

where 4321 is ssh port.

Make sure that you enabled this port in /etc/ssh/sshd_config.

Reconfigure & restart gitlab-ctl with following commands

gitlab-ctl restart

gitlab-ctl restart