标签:class always 五步 nic store 完成 art ack exec
官网升级路线: https://docs.gitlab.com/ee/policy/maintenance.html
docker exec -t gitlab gitlab-rake gitlab:backup:create CRON=1
备份完成将备份文件和配置目录(/srv/gitlab/config
) 通过scp拷贝到新机器上, 备份文件必须拷贝到目标机器的 /srv/gitlab/data/backups
打包完成scp到新机器
docker save gitlab/gitlab-ce:11.10.4-ce.0 > gitlab-ce-11.10.4-ce.0.tar
scp -r /srv/gitlab/config/ 172.16.240.15:/srv/gitlab/config/
https://hub.docker.com/r/gitlab/gitlab-ce/tags?page=3
docker load -i gitlab-ce-11.10.4-ce.0.tar
docker run -d --name gitlab --hostname gitlab.hims-portal-stg1.paic.com.cn -p 443:443 -p 80:80 -p 8022:22 --restart always -v /srv/gitlab/config:/etc/gitlab -v /srv/gitlab/logs:/var/log/gitlab -v /srv/gitlab/data:/var/opt/gitlab gitlab/gitlab-ce:11.10.4-ce.0
ls /srv/gitlab/data/backups/
1576659671_2019_12_18_11.10.4_gitlab_backup.tar
chmod +r /srv/gitlab/data/backups/1576659671_2019_12_18_11.10.4_gitlab_backup.tar
docker exec -it gitlab gitlab-ctl stop unicorn
docker exec -it gitlab gitlab-ctl stop sidekiq
docker exec -it gitlab gitlab-rake gitlab:backup:restore BACKUP=1576659671_2019_12_18_11.10.4
docker exec -it gitlab gitlab-ctl restart
docker stop gitlab
docker rm gitlab
docker pull gitlab/gitlab-ce:11.11.8-ce.0
docker run -d --name gitlab --hostname gitlab.hims-portal-stg1.paic.com.cn -p 443:443 -p 80:80 -p 8022:22 --restart always -v /srv/gitlab/config:/etc/gitlab -v /srv/gitlab/logs:/var/log/gitlab -v /srv/gitlab/data:/var/opt/gitlab gitlab/gitlab-ce:11.10.4-ce.0
docker restart gitlab
docker stop gitlab
docker rm gitlab
docker pull gitlab/gitlab-ce:12.0.9-ce.0
docker run -d --name gitlab --hostname gitlab.hims-portal-stg1.paic.com.cn -p 443:443 -p 80:80 -p 8022:22 --restart always -v /srv/gitlab/config:/etc/gitlab -v /srv/gitlab/logs:/var/log/gitlab -v /srv/gitlab/data:/var/opt/gitlab gitlab/gitlab-ce:12.0.9-ce.0
docker restart gitlab
docker stop gitlab
docker rm gitlab
docker pull gitlab/gitlab-ce:12.1.17-ce.0
docker run -d --name gitlab --hostname gitlab.hims-portal-stg1.paic.com.cn -p 443:443 -p 80:80 -p 8022:22 --restart always -v /srv/gitlab/config:/etc/gitlab -v /srv/gitlab/logs:/var/log/gitlab -v /srv/gitlab/data:/var/opt/gitlab gitlab/gitlab-ce:12.1.17-ce.0
docker restart gitlab
/opt/gitlab/ gitlab安装目录
/etc/gitlab/gitlab.rb 配置文件
/var/opt/gitlab 数据文件
/var/opt/gitlab/git-data/ 仓库文件
标签:class always 五步 nic store 完成 art ack exec
原文地址:https://www.cnblogs.com/cjwnb/p/12067925.html