在Ubuntu上遷移GitLab可參考以下步驟:
sudo gitlab-rake gitlab:backup:create
命令備份數據,備份文件默認存放在/var/opt/gitlab/backups
目錄下,同時手動備份/etc/gitlab
目錄下的gitlab.rb
、gitlab-secrets.json
等配置文件。sudo gitlab-ctl stop unicorn
和sudo gitlab-ctl stop sidekiq
命令停止GitLab服務。scp
或rsync
命令。sudo gitlab-rake gitlab:backup:restore BACKUP=[備份文件名]
命令恢復數據,恢復后需將配置文件復制到/etc/gitlab
目錄。sudo gitlab-ctl reconfigure
使配置生效,然后使用sudo gitlab-ctl start
啟動GitLab服務。