Created
November 22, 2019 13:42
-
-
Save yurytello/00286f535f549469a0dbcc4f6d8d3261 to your computer and use it in GitHub Desktop.
GitLab - Upgrade, backup and restore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt upgrade -y | |
sudo apt install curl openssh-server ca-certificates postfix -y | |
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash | |
sudo apt-get install gitlab-ce=11.7.5-ce.0 | |
sudo gitlab-ctl reconfigure | |
sudo apt-get install gitlab-ce=11.11.0-ce.0 | |
sudo gitlab-ctl reconfigure | |
sudo apt-get install gitlab-ce | |
vi /etc/gitlab/gitlab.rb | |
sudo gitlab-ctl reconfigure | |
sudo gitlab-ctl renew-le-certs | |
# cd /var/opt/gitlab/git-data/ | |
# tar -czvf repositories.tar.gz repositories | |
$ su - gitlab-psql | |
$ export PGHOST=/var/opt/gitlab/postgresql | |
$ psql -l | |
List of databases | |
Name | Owner | Encoding | Collate | Ctype | Access privileges | |
---------------------+-------------+----------+---------+---------+--------------------------------- | |
gitlab | gitlab | UTF8 | C.UTF-8 | C.UTF-8 | | |
gitlabhq_production | gitlab | UTF8 | C.UTF-8 | C.UTF-8 | | |
postgres | gitlab-psql | UTF8 | C.UTF-8 | C.UTF-8 | | |
template0 | gitlab-psql | UTF8 | C.UTF-8 | C.UTF-8 | =c/"gitlab-psql" + | |
| | | | | "gitlab-psql"=CTc/"gitlab-psql" | |
template1 | gitlab-psql | UTF8 | C.UTF-8 | C.UTF-8 | =c/"gitlab-psql" + | |
| | | | | "gitlab-psql"=CTc/"gitlab-psql" | |
(5 rows) | |
# sudo gitlab-ctl reconfigure | |
# sudo gitlab-ctl restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment