GitLab-CE 8.14.1 ==> GitLab-CE 11.10.4
其中mysql ==> pgsql
- gitlab旧版本镜像使用的是sameersbn/docker-gitlab:8.14.1,新版本镜像sameersbn/gitlab:11.10.4
- postgresql镜像使用的是sameersbn/postgresql:9.6
- redis镜像使用的是sameersbn/redis:latest
- gitlab升级参考:
https://github.com/sameersbn/docker-gitlab#upgrading (实际采用)- 数据库迁移参考:
https://github.com/lanyrd/mysql-postgresql-converter (参照思路,重写了代码)
https://github.com/zijing66/mysql_to_postgresql_merger(实际采用)
https://github.com/aliyun/rds_dbsync/blob/master/doc/mysql2pgsql_ch.md
-rwxr-xr--. 1 root root 851 6月 3 10:42 start_gitlab_10.8.4.sh
-rwxr-xr--. 1 root root 852 6月 3 11:26 start_gitlab_11.10.4.sh
-rwxr-xr--. 1 root root 851 6月 3 10:21 start_gitlab_8.14.1.sh
-rwxr-xr--. 1 root root 850 6月 3 10:34 start_gitlab_8.17.4.sh
-rwxr-xr--. 1 root root 849 6月 3 10:38 start_gitlab_9.5.5.sh
-rwxr-xr--. 1 root root 886 6月 3 11:26 start_gitlab_backup_10.8.4.sh
-rwxr-xr--. 1 root root 885 6月 3 10:33 start_gitlab_backup_8.14.1.sh
-rwxr-xr--. 1 root root 885 6月 3 10:37 start_gitlab_backup_8.17.4.sh
-rwxr-xr--. 1 root root 884 6月 3 10:40 start_gitlab_backup_9.5.5.sh
$./start_gitlab_backup_8.14.1.sh
$./start_gitlab_8.17.4.sh
$./start_gitlab_backup_8.17.4.sh
$./start_gitlab_9.5.5.sh
$./start_gitlab_backup_9.5.5.sh
$./start_gitlab_10.8.4.sh
$./start_gitlab_backup_10.8.4.sh
# 更换为
$docker exec -it -u root gitlab10 bash
$bundle exec rake gitlab:backup:create RAILS_ENV=production
出现10.8.4备份失败的问题:
解决方案参考:
https://github.com/sameersbn/docker-gitlab/issues/1576#issuecomment-437339882
https://github.com/sameersbn/docker-gitlab/issues/1576#issuecomment-390137195 (本地试用有效)
$./start_gitlab_11.10.4.sh
完成迁移
# 先压缩,再scp,再解压
$vi start_postgresql9.6.sh
docker run --name postgresql_gitlab_9_6 -itd --restart always \
--env 'PG_PASSWORD=passw0rd' \
--env 'DB_NAME=gitlabhq_production' \
--env 'DB_USER=gitlab' --env 'DB_PASS=passw0rd' \
--env 'DB_EXTENSION=pg_trgm' \
--volume /srv/docker/gitlab/postgresql9:/var/lib/postgresql \
--volume /etc/localtime:/etc/localtime:ro \
--publish 5431:5432 \
sameersbn/postgresql:9.6
# 启动前清除pgsql的旧数据
$rm /srv/docker/gitlab/postgresql9
# 修改gitlab启动脚本
$vi start_gitlab_8_14_1.sh
docker run --name gitlab8 -d \
--link postgresql_gitlab_9_6:postgresql \
--link redis_gitlab:redisio \
-e 'UNICORN_WORKERS=15' \
-e 'GITLAB_SECRETS_DB_KEY_BASE=long-and-random-alpha-numeric-string' \
-e 'GITLAB_SECRETS_SECRET_KEY_BASE=long-and-random-alpha-numeric-string' \
-e 'GITLAB_SECRETS_OTP_KEY_BASE=long-and-random-alpha-numeric-string' \
-e '[email protected]' \
-e 'SMTP_PASS=123456' \
-e 'SMTP_ENABLED=true' \
-e 'SMTP_DOMAIN=xxx.com' \
-e 'SMTP_HOST=xx.xx.xx.xx' \
-e 'NGINX_MAX_UPLOAD_SIZE=128m' \
-e 'SMTP_AUTHENTICATION=login' \
-e 'GITLAB_HOST=192.166.204.130' \
-e 'GITLAB_SSH_PORT=10022' \
-e 'GITLAB_PORT=10080' \
-v /srv/docker/gitlab/gitlab/data:/home/git/data \
-v /etc/localtime:/etc/localtime:ro \
-p 10022:22 \
-p 10080:80 \
-p 10443:443 \
sameersbn/gitlab:8.14.1
$docker stop gitlab8
$mysqldump --compatible=postgresql --default-character-set=utf8 -r gitlabhq_production.mysql -uroot -p gitlabhq_production
# - lanyrd/mysql-postgresql-converter
# 更换采用本地调整过的代码 $python db_converter.py gitlabhq_production.mysql gitlabhq_production.psql
$python db_converter_for_exist_tb.py gitlabhq_production.mysql gitlabhq_production.psql
# $mysqldump --compatible=postgresql --default-character-set=utf8 -uroot -p gitlabhq_production -r gitlabhq_production.mysql
# -t:不导出DDL,-c:导出完整的insert语句
$mysqldump -t -c --compatible=postgresql --default-character-set=utf8 -uroot -p gitlabhq_production -r mysql_gitlabhq_production_dataonly.mysql
$pg_dump -s -U postgres gitlabhq_production -f postgres_gitlabhq_production_ddlonly.dump
$python db_data_merge.py mysql_gitlabhq_production_dataonly.mysql postgres_gitlabhq_production_ddlonly.dump gitlabhq_production_merged.psql
# 进入容器
$docker exec -it -u root postgresql_gitlab_9_6 bash
# 进入数据库,用postgres用户
$psql -U postgres postgres
# 数据库重做开始
$drop database gitlabhq_production;
$create database gitlabhq_production with owner=gitlab;
# 重新调整postgres和gitlab用户权限
$grant all privileges on database gitlabhq_production to gitlab;
$grant all privileges on database gitlabhq_production to postgres;
# schema授权给gitlab
# $grant all on SCHEMA public to gitlab;
# $psql -U gitlab -d gitlabhq_production -f gitlabhq_production.psql
$psql -U postgres -d gitlabhq_production -f gitlabhq_production_merged.psql
# $alter role gitlab with CREATEDB SUPERUSER;
# 查看role
$\du
$docker restart postgresql_gitlab_9_6
$docker start gitlab8
# $alter role gitlab with nosuperuser;
$docker exec -it -u root gitlab8 bash
$cd /home/git/data
$chown -R git:git ./
# 重启容器检查gitlab前台是否正常
$docker restart gitlab8 && docker logs -f gitlab8
# 准备好gitlab的docker镜像升级包
$docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
sameersbn/gitlab 11.10.4 cbedd9a35d60 3 weeks ago 2.25GB
sameersbn/gitlab 10.8.4 74dba660e552 11 months ago 2.33GB
sameersbn/gitlab 9.5.5 30a23f8a69f1 20 months ago 1.69GB
sameersbn/gitlab 8.17.4 1575f2089d16 2 years ago 1.03GB
sameersbn/gitlab 8.14.1 605aa4c433d1 2 years ago 778MB
sameersbn/postgresql 10 27c74465cc2f 10 months ago 204MB
sameersbn/postgresql 9.6 af8f69984dd3 2 years ago 233MB
sameersbn/redis latest 105a23df8fb2 4 months ago 90.3MB
# (如果是save的镜像打包文件,则需要)读取镜像
$docker load -i gitlab_image_11.10.4.tar
# 准备逐级升级镜像(直接升级会报错)
$docker pull sameersbn/gitlab:8.17.4
$docker pull sameersbn/gitlab:9.5.5
$docker pull sameersbn/gitlab:10.8.4
$docker pull sameersbn/gitlab:11.10.4
# docker 可选参数:
-v /etc/localtime:/etc/localtime:ro # 时间同步:ro(容器内只读)
# 编写8.14.1备份脚本
$vi start_gitlab_backup_8.14.1.sh
docker run --name gitlab8 -d --rm \
--link postgresql_gitlab_9_6:postgresql \
--link redis_gitlab:redisio \
-e 'UNICORN_WORKERS=15' \
-e 'GITLAB_SECRETS_DB_KEY_BASE=long-and-random-alpha-numeric-string' \
-e 'GITLAB_SECRETS_SECRET_KEY_BASE=long-and-random-alpha-numeric-string' \
-e 'GITLAB_SECRETS_OTP_KEY_BASE=long-and-random-alpha-numeric-string' \
-e '[email protected]' \
-e 'SMTP_PASS=123456' \
-e 'SMTP_ENABLED=true' \
-e 'SMTP_DOMAIN=xxx.com' \
-e 'SMTP_HOST=xx.xx.xx.xx' \
-e 'NGINX_MAX_UPLOAD_SIZE=128m' \
-e 'SMTP_AUTHENTICATION=login' \
-e 'GITLAB_HOST=192.166.204.130' \
-e 'GITLAB_SSH_PORT=10022' \
-e 'GITLAB_PORT=10080' \
-v /srv/docker/gitlab/gitlab/data:/home/git/data \
-v /etc/localtime:/etc/localtime:ro \
-p 10022:22 \
-p 10080:80 \
-p 10443:443 \
sameersbn/gitlab:8.14.1 app:rake gitlab:backup:create
# 编写8.17.4备份脚本
$vi start_gitlab_backup_8.17.4.sh
docker run --name gitlab8 -d --rm \
--link postgresql_gitlab_9_6:postgresql \
--link redis_gitlab:redisio \
-e 'UNICORN_WORKERS=15' \
-e 'GITLAB_SECRETS_DB_KEY_BASE=long-and-random-alpha-numeric-string' \
-e 'GITLAB_SECRETS_SECRET_KEY_BASE=long-and-random-alpha-numeric-string' \
-e 'GITLAB_SECRETS_OTP_KEY_BASE=long-and-random-alpha-numeric-string' \
-e '[email protected]' \
-e 'SMTP_PASS=123456' \
-e 'SMTP_ENABLED=true' \
-e 'SMTP_DOMAIN=xxx.com' \
-e 'SMTP_HOST=xx.xx.xx.xx' \
-e 'NGINX_MAX_UPLOAD_SIZE=128m' \
-e 'SMTP_AUTHENTICATION=login' \
-e 'GITLAB_HOST=192.166.204.130' \
-e 'GITLAB_SSH_PORT=10022' \
-e 'GITLAB_PORT=10080' \
-v /srv/docker/gitlab/gitlab/data:/home/git/data \
-v /etc/localtime:/etc/localtime:ro \
-p 10022:22 \
-p 10080:80 \
-p 10443:443 \
sameersbn/gitlab:8.17.4 app:rake gitlab:backup:create
# 编写9.5.5备份脚本
$vi start_gitlab_backup_9.5.5.sh
docker run --name gitlab9 -d --rm \
--link postgresql_gitlab_9_6:postgresql \
--link redis_gitlab:redisio \
-e 'UNICORN_WORKERS=15' \
-e 'GITLAB_SECRETS_DB_KEY_BASE=long-and-random-alpha-numeric-string' \
-e 'GITLAB_SECRETS_SECRET_KEY_BASE=long-and-random-alpha-numeric-string' \
-e 'GITLAB_SECRETS_OTP_KEY_BASE=long-and-random-alpha-numeric-string' \
-e '[email protected]' \
-e 'SMTP_PASS=123456' \
-e 'SMTP_ENABLED=true' \
-e 'SMTP_DOMAIN=xxx.com' \
-e 'SMTP_HOST=xx.xx.xx.xx' \
-e 'NGINX_MAX_UPLOAD_SIZE=128m' \
-e 'SMTP_AUTHENTICATION=login' \
-e 'GITLAB_HOST=192.166.204.130' \
-e 'GITLAB_SSH_PORT=10022' \
-e 'GITLAB_PORT=10080' \
-v /srv/docker/gitlab/gitlab/data:/home/git/data \
-v /etc/localtime:/etc/localtime:ro \
-p 10022:22 \
-p 10080:80 \
-p 10443:443 \
sameersbn/gitlab:9.5.5 app:rake gitlab:backup:create
# 编写10.8.4备份脚本
$vi start_gitlab_backup_10.8.4.sh
docker run --name gitlab10 -d --rm \
--link postgresql_gitlab_9_6:postgresql \
--link redis_gitlab:redisio \
-e 'UNICORN_WORKERS=15' \
-e 'GITLAB_SECRETS_DB_KEY_BASE=long-and-random-alpha-numeric-string' \
-e 'GITLAB_SECRETS_SECRET_KEY_BASE=long-and-random-alpha-numeric-string' \
-e 'GITLAB_SECRETS_OTP_KEY_BASE=long-and-random-alpha-numeric-string' \
-e '[email protected]' \
-e 'SMTP_PASS=123456' \
-e 'SMTP_ENABLED=true' \
-e 'SMTP_DOMAIN=xxx.com' \
-e 'SMTP_HOST=xx.xx.xx.xx' \
-e 'NGINX_MAX_UPLOAD_SIZE=128m' \
-e 'SMTP_AUTHENTICATION=login' \
-e 'GITLAB_HOST=192.166.204.130' \
-e 'GITLAB_SSH_PORT=10022' \
-e 'GITLAB_PORT=10080' \
-v /srv/docker/gitlab/gitlab/data:/home/git/data \
-v /etc/localtime:/etc/localtime:ro \
-p 10022:22 \
-p 10080:80 \
-p 10443:443 \
sameersbn/gitlab:10.8.4 app:rake gitlab:backup:create
# 编写8.17.4启动脚本
$vi start_gitlab_8.17.4.sh
docker run --name gitlab8 -d \
--link postgresql_gitlab_9_6:postgresql \
--link redis_gitlab:redisio \
-e 'UNICORN_WORKERS=15' \
-e 'GITLAB_SECRETS_DB_KEY_BASE=long-and-random-alpha-numeric-string' \
-e 'GITLAB_SECRETS_SECRET_KEY_BASE=long-and-random-alpha-numeric-string' \
-e 'GITLAB_SECRETS_OTP_KEY_BASE=long-and-random-alpha-numeric-string' \
-e '[email protected]' \
-e 'SMTP_PASS=123456' \
-e 'SMTP_ENABLED=true' \
-e 'SMTP_DOMAIN=xxx.com' \
-e 'SMTP_HOST=xx.xx.xx.xx' \
-e 'NGINX_MAX_UPLOAD_SIZE=128m' \
-e 'SMTP_AUTHENTICATION=login' \
-e 'GITLAB_HOST=192.166.204.130' \
-e 'GITLAB_SSH_PORT=10022' \
-e 'GITLAB_PORT=10080' \
-v /srv/docker/gitlab/gitlab/data:/home/git/data \
-v /etc/localtime:/etc/localtime:ro \
-p 10022:22 \
-p 10080:80 \
-p 10443:443 \
sameersbn/gitlab:8.17.4
# 编写9.5.5启动脚本
$vi start_gitlab_9.5.5.sh
docker run --name gitlab9 -d \
--link postgresql_gitlab_9_6:postgresql \
--link redis_gitlab:redisio \
-e 'UNICORN_WORKERS=15' \
-e 'GITLAB_SECRETS_DB_KEY_BASE=long-and-random-alpha-numeric-string' \
-e 'GITLAB_SECRETS_SECRET_KEY_BASE=long-and-random-alpha-numeric-string' \
-e 'GITLAB_SECRETS_OTP_KEY_BASE=long-and-random-alpha-numeric-string' \
-e '[email protected]' \
-e 'SMTP_PASS=123456' \
-e 'SMTP_ENABLED=true' \
-e 'SMTP_DOMAIN=xxx.com' \
-e 'SMTP_HOST=xx.xx.xx.xx' \
-e 'NGINX_MAX_UPLOAD_SIZE=128m' \
-e 'SMTP_AUTHENTICATION=login' \
-e 'GITLAB_HOST=192.166.204.130' \
-e 'GITLAB_SSH_PORT=10022' \
-e 'GITLAB_PORT=10080' \
-v /srv/docker/gitlab/gitlab/data:/home/git/data \
-v /etc/localtime:/etc/localtime:ro \
-p 10022:22 \
-p 10080:80 \
-p 10443:443 \
sameersbn/gitlab:9.5.5
# 编写10.8.4启动脚本
$vi start_gitlab_10.8.4.sh
docker run --name gitlab10 -d \
--link postgresql_gitlab_9_6:postgresql \
--link redis_gitlab:redisio \
-e 'UNICORN_WORKERS=15' \
-e 'GITLAB_SECRETS_DB_KEY_BASE=long-and-random-alpha-numeric-string' \
-e 'GITLAB_SECRETS_SECRET_KEY_BASE=long-and-random-alpha-numeric-string' \
-e 'GITLAB_SECRETS_OTP_KEY_BASE=long-and-random-alpha-numeric-string' \
-e '[email protected]' \
-e 'SMTP_PASS=123456' \
-e 'SMTP_ENABLED=true' \
-e 'SMTP_DOMAIN=xxx.com' \
-e 'SMTP_HOST=xx.xx.xx.xx' \
-e 'NGINX_MAX_UPLOAD_SIZE=128m' \
-e 'SMTP_AUTHENTICATION=login' \
-e 'GITLAB_HOST=192.166.204.130' \
-e 'GITLAB_SSH_PORT=10022' \
-e 'GITLAB_PORT=10080' \
-v /srv/docker/gitlab/gitlab/data:/home/git/data \
-v /etc/localtime:/etc/localtime:ro \
-p 10022:22 \
-p 10080:80 \
-p 10443:443 \
sameersbn/gitlab:10.8.4
# 编写11.10.4启动脚本
$vi start_gitlab_11.10.4.sh
docker run --name gitlab11 -d \
--link postgresql_gitlab_9_6:postgresql \
--link redis_gitlab:redisio \
-e 'UNICORN_WORKERS=15' \
-e 'GITLAB_SECRETS_DB_KEY_BASE=long-and-random-alpha-numeric-string' \
-e 'GITLAB_SECRETS_SECRET_KEY_BASE=long-and-random-alpha-numeric-string' \
-e 'GITLAB_SECRETS_OTP_KEY_BASE=long-and-random-alpha-numeric-string' \
-e '[email protected]' \
-e 'SMTP_PASS=123456' \
-e 'SMTP_ENABLED=true' \
-e 'SMTP_DOMAIN=xxx.com' \
-e 'SMTP_HOST=xx.xx.xx.xx' \
-e 'NGINX_MAX_UPLOAD_SIZE=128m' \
-e 'SMTP_AUTHENTICATION=login' \
-e 'GITLAB_HOST=192.166.204.130' \
-e 'GITLAB_SSH_PORT=10022' \
-e 'GITLAB_PORT=10080' \
-v /srv/docker/gitlab/gitlab/data:/home/git/data \
-v /etc/localtime:/etc/localtime:ro \
-p 10022:22 \
-p 10080:80 \
-p 10443:443 \
sameersbn/gitlab:11.10.4
$chmod 754 start_gitlab_*.sh
#启动脚本整理
$cd ~/sbin
$ln -s /root/start/gitlab/start_gitlab_10.8.4.sh
$ln -s /root/start/gitlab/start_gitlab_11.10.4.sh
$ln -s /root/start/gitlab/start_gitlab_8.14.1.sh
$ln -s /root/start/gitlab/start_gitlab_8.17.4.sh
$ln -s /root/start/gitlab/start_gitlab_9.5.5.sh
$ln -s /root/start/gitlab/start_gitlab_backup_10.8.4.sh
$ln -s /root/start/gitlab/start_gitlab_backup_8.14.1.sh
$ln -s /root/start/gitlab/start_gitlab_backup_8.17.4.sh
$ln -s /root/start/gitlab/start_gitlab_backup_9.5.5.sh
# 添加路径到path环境变量
$vi .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin:$HOME/sbin
export PATH
# 准备恢复备份脚本随时修改
$vi start_gitlab_restore.sh
docker run --name gitlab9 -it --rm \
--link postgresql_gitlab_9_6:postgresql \
--link redis_gitlab:redisio \
-e 'UNICORN_WORKERS=15' \
-e 'GITLAB_SECRETS_DB_KEY_BASE=long-and-random-alpha-numeric-string' \
-e 'GITLAB_SECRETS_SECRET_KEY_BASE=long-and-random-alpha-numeric-string' \
-e 'GITLAB_SECRETS_OTP_KEY_BASE=long-and-random-alpha-numeric-string' \
-e '[email protected]' \
-e 'SMTP_PASS=123456' \
-e 'SMTP_ENABLED=true' \
-e 'SMTP_DOMAIN=xxx.com' \
-e 'SMTP_HOST=xx.xx.xx.xx' \
-e 'NGINX_MAX_UPLOAD_SIZE=128m' \
-e 'SMTP_AUTHENTICATION=login' \
-e 'GITLAB_HOST=192.166.204.130' \
-e 'GITLAB_SSH_PORT=10022' \
-e 'GITLAB_PORT=10080' \
-v /srv/docker/gitlab/gitlab/data:/home/git/data \
-v /etc/localtime:/etc/localtime:ro \
-p 10022:22 \
-p 10080:80 \
-p 10443:443 \
sameersbn/gitlab:9.5.5 app:rake gitlab:backup:restore
开始进行升级(备份需注意磁盘空间)
升级8.17.4
# 移除正常的旧容器,防止重名
$docker stop gitlab8 && docker rm gitlab8
# 执行备份8.14.1
$start_gitlab_backup_8.14.1.sh && docker logs -f gitlab8
# 执行升级8.17.4
$start_gitlab_8.17.4.sh && docker logs -f gitlab8
# 检查gitlab
# 移除旧容器
$docker stop gitlab8 && docker rm gitlab8
# 执行备份8.17.4
$start_gitlab_backup_8.17.4.sh && docker logs -f gitlab8
# 执行升级9.5.5
$start_gitlab_9.5.5.sh && docker logs -f gitlab9
# 检查gitlab
错误(数据迁移方案一):
# 移除旧容器
$docker stop gitlab9 && docker rm gitlab9
# 执行备份9.5.5
$start_gitlab_backup_9.5.5.sh && docker logs -f gitlab9
# 执行升级10.8.4
$start_gitlab_10.8.4.sh && docker logs -f gitlab10
# 检查gitlab
XXX 启动失败
重新制定数据库迁移方案(方案二):升级需要先重启postgresql
# 移除旧容器
$docker stop gitlab9 && docker rm gitlab9
# 执行备份9.5.5
$start_gitlab_backup_9.5.5.sh && docker logs -f gitlab9
# 执行升级10.8.4
$start_gitlab_10.8.4.sh && docker logs -f gitlab10
# 检查gitlab
# 移除旧容器
$docker stop gitlab10 && docker rm gitlab10
# 执行备份10.8.4
$start_gitlab_backup_10.8.4.sh && docker logs -f gitlab10
# 其中如果备份异常(10.8.4backup error) start_gitlab_backup_10.8.4.sh 更换为:
$start_gitlab_10.8.4.sh
$docker exec -it -u root gitlab10 bash
$su - git
$cd /home/git/gitlab
$bundle exec rake gitlab:backup:create RAILS_ENV=production
# 移除旧容器
$docker stop gitlab10 && docker rm gitlab10
# 执行升级11.10.4
$start_gitlab_11.10.4.sh && docker logs -f gitlab11
# 检查gitlab
$ start_gitlab_backup_10.8.4.sh && docker logs -f gitlab10
fcc0a1e82e34c3748a5d0c0ed27abc07045bc8cb6c30d50a41fb71988a54f8b3
Loading /etc/docker-gitlab/runtime/env-defaults
Initializing logdir...
Initializing datadir...
Installing configuration templates...
Configuring gitlab...
Configuring gitlab::database
Configuring gitlab::redis
Configuring gitlab::secrets...
Configuring gitlab::sidekiq...
Configuring gitlab::gitaly...
Configuring gitlab::monitoring...
Configuring gitlab::gitlab-workhorse...
Configuring gitlab::unicorn...
Configuring gitlab::timezone...
Configuring gitlab::rack_attack...
Configuring gitlab::ci...
Configuring gitlab::artifacts...
Configuring gitlab::lfs...
Configuring gitlab::uploads...
Configuring gitlab::mattermost...
Configuring gitlab::project_features...
Configuring gitlab::smtp_settings...
Configuring gitlab::oauth...
Configuring gitlab::ldap...
Configuring gitlab::cron_jobs...
Configuring gitlab::backups...
Configuring gitlab::registry...
Configuring gitlab::pages...
Configuring gitlab-shell...
Configuring nginx...
Configuring nginx::gitlab...
Running raketask gitlab:backup:create...
Missing Rails.application.secrets.openid_connect_signing_key for production environment. The secret will be generated and stored in config/secrets.yml.
Dumping database ...
rake aborted!
Gitlab::Git::CommandError: 14:Connect Failed
/home/git/gitlab/lib/gitlab/git/repository.rb:1454:in `rescue in gitaly_migrate'
/home/git/gitlab/lib/gitlab/git/repository.rb:1447:in `gitaly_migrate'
/home/git/gitlab/lib/gitlab/git/repository.rb:1606:in `uncached_has_local_branches?'
/home/git/gitlab/lib/gitlab/git/repository.rb:237:in `block in has_local_branches?'
/home/git/gitlab/lib/gitlab/utils/strong_memoize.rb:26:in `strong_memoize'
/home/git/gitlab/lib/gitlab/git/repository.rb:236:in `has_local_branches?'
/home/git/gitlab/app/models/repository.rb:517:in `has_visible_content?'
/home/git/gitlab/lib/gitlab/repository_cache_adapter.rb:17:in `block (2 levels) in cache_method'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/cache.rb:299:in `block in fetch'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/cache.rb:585:in `block in save_block_result_to_cache'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/cache.rb:547:in `block in instrument'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/notifications.rb:166:in `instrument'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/cache.rb:547:in `instrument'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/cache.rb:584:in `save_block_result_to_cache'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/cache.rb:299:in `fetch'
/home/git/gitlab/lib/gitlab/repository_cache.rb:22:in `fetch'
/home/git/gitlab/lib/gitlab/repository_cache_adapter.rb:54:in `cache_method_output'
/home/git/gitlab/lib/gitlab/repository_cache_adapter.rb:16:in `block in cache_method'
/home/git/gitlab/app/models/repository.rb:491:in `empty?'
/home/git/gitlab/app/models/repository.rb:336:in `expire_emptiness_caches'
/home/git/gitlab/lib/backup/repository.rb:212:in `empty_repo?'
/home/git/gitlab/lib/backup/repository.rb:24:in `block in dump'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/relation/batches.rb:51:in `block (2 levels) in find_each'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/relation/batches.rb:51:in `each'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/relation/batches.rb:51:in `block in find_each'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/relation/batches.rb:124:in `find_in_batches'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/relation/batches.rb:50:in `find_each'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/querying.rb:9:in `find_each'
/home/git/gitlab/lib/backup/repository.rb:12:in `dump'
/home/git/gitlab/lib/tasks/gitlab/backup.rake:82:in `block (4 levels) in <top (required)>'
/home/git/gitlab/lib/tasks/gitlab/backup.rake:12:in `block (3 levels) in <top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/rake-12.3.1/exe/rake:27:in `'
Caused by:
GRPC::Unavailable: 14:Connect Failed
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/grpc-1.11.0-x86_64-linux/src/ruby/lib/grpc/generic/active_call.rb:31:in `check_status'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/grpc-1.11.0-x86_64-linux/src/ruby/lib/grpc/generic/active_call.rb:180:in `attach_status_results_and_complete_call'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/grpc-1.11.0-x86_64-linux/src/ruby/lib/grpc/generic/active_call.rb:372:in `request_response'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/grpc-1.11.0-x86_64-linux/src/ruby/lib/grpc/generic/client_stub.rb:178:in `block in request_response'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/grpc-1.11.0-x86_64-linux/src/ruby/lib/grpc/generic/interceptors.rb:170:in `intercept!'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/grpc-1.11.0-x86_64-linux/src/ruby/lib/grpc/generic/client_stub.rb:177:in `request_response'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/grpc-1.11.0-x86_64-linux/src/ruby/lib/grpc/generic/service.rb:170:in `block (3 levels) in rpc_stub_class'
/home/git/gitlab/lib/gitlab/gitaly_client.rb:134:in `call'
/home/git/gitlab/lib/gitlab/gitaly_client/repository_service.rb:88:in `has_local_branches?'
/home/git/gitlab/lib/gitlab/git/repository.rb:1608:in `block in uncached_has_local_branches?'
/home/git/gitlab/lib/gitlab/gitaly_client.rb:268:in `block (2 levels) in migrate'
/home/git/gitlab/lib/gitlab/gitaly_client.rb:308:in `allow_n_plus_1_calls'
/home/git/gitlab/lib/gitlab/gitaly_client.rb:261:in `block in migrate'
/home/git/gitlab/lib/gitlab/metrics/influx_db.rb:98:in `measure'
/home/git/gitlab/lib/gitlab/gitaly_client.rb:259:in `migrate'
/home/git/gitlab/lib/gitlab/git/repository.rb:1448:in `gitaly_migrate'
/home/git/gitlab/lib/gitlab/git/repository.rb:1606:in `uncached_has_local_branches?'
/home/git/gitlab/lib/gitlab/git/repository.rb:237:in `block in has_local_branches?'
/home/git/gitlab/lib/gitlab/utils/strong_memoize.rb:26:in `strong_memoize'
/home/git/gitlab/lib/gitlab/git/repository.rb:236:in `has_local_branches?'
/home/git/gitlab/app/models/repository.rb:517:in `has_visible_content?'
/home/git/gitlab/lib/gitlab/repository_cache_adapter.rb:17:in `block (2 levels) in cache_method'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/cache.rb:299:in `block in fetch'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/cache.rb:585:in `block in save_block_result_to_cache'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/cache.rb:547:in `block in instrument'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/notifications.rb:166:in `instrument'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/cache.rb:547:in `instrument'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/cache.rb:584:in `save_block_result_to_cache'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/cache.rb:299:in `fetch'
/home/git/gitlab/lib/gitlab/repository_cache.rb:22:in `fetch'
/home/git/gitlab/lib/gitlab/repository_cache_adapter.rb:54:in `cache_method_output'
/home/git/gitlab/lib/gitlab/repository_cache_adapter.rb:16:in `block in cache_method'
/home/git/gitlab/app/models/repository.rb:491:in `empty?'
/home/git/gitlab/app/models/repository.rb:336:in `expire_emptiness_caches'
/home/git/gitlab/lib/backup/repository.rb:212:in `empty_repo?'
/home/git/gitlab/lib/backup/repository.rb:24:in `block in dump'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/relation/batches.rb:51:in `block (2 levels) in find_each'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/relation/batches.rb:51:in `each'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/relation/batches.rb:51:in `block in find_each'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/relation/batches.rb:124:in `find_in_batches'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/relation/batches.rb:50:in `find_each'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/querying.rb:9:in `find_each'
/home/git/gitlab/lib/backup/repository.rb:12:in `dump'
/home/git/gitlab/lib/tasks/gitlab/backup.rake:82:in `block (4 levels) in '
/home/git/gitlab/lib/tasks/gitlab/backup.rake:12:in `block (3 levels) in <top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
Tasks: TOP => gitlab:backup:repo:create
(See full trace by running task with --trace)
Dumping PostgreSQL database gitlabhq_production ... [DONE]
done
Dumping repositories ...