Git 常用使用记录
Summary: Author: 张亚飞 | Read Time: 1 minute read | Published: 2016-03-30
Filed under
—
Categories:
Linux
—
Tags:
Note,
Gitlab 备份迁移
sudo gitlab-rake gitlab:backup:create
- 版本不一致,会导致如下问题:
Your current GitLab version (11.6.3) differs from the GitLab version in the backup!
Please switch to the following version and try again:
version: 11.4.5
- 将备份的数据复制至新机器
scp 1493107454_2017_04_25_9.1.0_gitlab_backup.tar 192.168.99.116:`pwd`
chown git.git /var/opt/gitlab/backups/*.tar
gitlab-ctl stop unicorn
gitlab-ctl stop sidekiq
gitlab-rake gitlab:backup:restore BACKUP=1493107454_2017_04_25_9.1.0
gitlab-ctl restart
gitlab-rake gitlab:check SANITIZE=true
参考:
Gitlab 错误日志
查看错误日志
gitlab-ctl tail
gitlab-ctl tail postgresql
- gp 数据升级
sudo gitlab-ctl pg-upgrade
sudo gitlab-ctl revert-pg-upgrade
Gitlab 升级
apt-get install gitlab-ce
- Gitlab 版本信息
Fri Jan 11 23:13:32 coam@a.us.0:~$ head -1 /opt/gitlab/version-manifest.txt
gitlab-ce 11.4.5
- 由于宿主机安装的
gitlab
与docker
编译安装的版本不一致 [11.4.5 -> 11.6.3],导致使用docker
启动gitlab
服务后出现prometheus.yaml
格式不对的错误:
gitlab-ctl prometheus-upgrade
特别注意: 升级
gitlab
版本前需要在旧版本环境中升级后,再使用高版本的docker
及gitlab
镜像挂载启动gitlab
数据配置目录.
Comments