User Tools

Site Tools


computing:gitlab-ce

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
computing:gitlab-ce [2020/01/02 00:14]
oemb1905
computing:gitlab-ce [2020/12/21 10:41] (current)
oemb1905 ll
Line 67: Line 67:
   sudo systemctl restart gitlab-runsvdir.service   sudo systemctl restart gitlab-runsvdir.service
      
-I do not use the default Let's Encrypt tool in ''gitlab.rb'' because it fails.  I work around this issue by building a basic ''.html'' website first, encrypting that, and then changing the configs to reverse proxies specified above.  See the Apache Survival link above for more information.+I do not use the default Let's Encrypt tool in ''gitlab.rb'' because it fails.  I work around this issue by building a basic ''.html'' website first, encrypting that, and then changing the configs to reverse proxies specified above.  Need to migrate your gitlab-ce instance to a new host?  First, prepare the backups and configs on the old host and copy those the new host.
  
- --- //[[jonathan@haacksnetworking.com|oemb1905]] 2020/01/01 23:54//+  sudo gitlab-ctl stop unicorn 
 +  sudo gitlab-ctl stop sidekiq 
 +  sudo gitlab-rake gitlab:backup:create 
 +  mkdir gitlab-old-host 
 +  sudo cp /etc/gitlab/gitlab.rb ~/gitlab-old 
 +  sudo cp /etc/gitlab/gitlab-secrets.json ~/gitlab-old 
 +  sudo cp -R /etc/gitlab/trusted-certs/ ~/gitlab-old 
 +  sudo cp /var/opt/gitlab/backups/XXXXXXXXXX_gitlab_backup.tar 
 +  scp -r ~/gitlab-old-host user@10.xx.xx.x: 
 +   
 +Now that you have copied those configs and files over the new host, it is time to restore the new host with those backups.  Warning:  I am assuming you already followed the above initial setup steps on the new host that are detailed above, and have left that instance vanilla.  Once that new install is running and accessible and vanilla (no changes), do the following. 
 + 
 +  sudo cp gitlab-old-host/gitlab* /etc/gitLab/ 
 +  sudo cp -r gitlab-old-host/trusted-certs /etc/gitlab/trusted-certs 
 +  sudo gitlab-ctl reconfigure 
 +  sudo gitlab-ctl stop unicorn 
 +  sudo gitlab-ctl stop sidekiq 
 +  sudo cp gitlab-old/XXXXXXXXXX_gitlab_backup.tar /var/opt/gitlab/backups/ 
 +  sudo chown git:git /var/opt/gitlab/backups/XXXXXXXXXX_gitlab_backup.tar 
 +  sudo gitlab-rake gitlab:backup:restore BACKUP=XXXXXXXXX 
 +  sudo gitlab-ctl start 
 +  sudo gitlab-rake gitlab:check SANITIZE=true 
 +   
 +Navigate to your web browser, and all should be restored.  ;) 
 + 
 + --- //[[jonathan@haacksnetworking.com|oemb1905]] 2020/12/21 10:33//
computing/gitlab-ce.txt · Last modified: 2020/12/21 10:41 by oemb1905