Gitlab Omnibus 更新出错(8.0.1 至 8.0.2)

Gitlab Omnibus 更新出错(8.0.1 至 8.0.2)

我在 CentOS 7 服务器上全新安装了 Gitlab 服务器。当我尝试将sudo yum install gitlab-ce软件包更新到版本 8.0.2 时,出现错误:

... truncated ...
gitlab-ce-8.0.2-ce.1.el7.x86_64.rpm                                                                                                                                                                                                                    | 336 MB  00:00:39
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
gitlab preinstall: Backing up GitLab SQL database (excluding Git repositories, uploads)
rake aborted!
Errno::EACCES: Permission denied @ dir_s_mkdir - /var/opt/gitlab/backups
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/database.rb:15:in `dump'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/backup.rake:66:in `block (4 levels) in <top (required)>'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/backup.rake:11:in `block (3 levels) in <top (required)>'
Tasks: TOP => gitlab:backup:db:create
(See full trace by running task with --trace)
Dumping database ...
gitlab preinstall:
gitlab preinstall: Backup failed! If you want to skip this backup, run the following command and
gitlab preinstall: try again:
gitlab preinstall:
gitlab preinstall:   sudo touch /etc/gitlab/skip-auto-migrations
gitlab preinstall:
... truncated ...

答案1

解决方案很简单。您可以创建一个备份目录/var/opt/gitlab/backups并为其设置正确的所有者和组。

sudo mkdir /var/opt/gitlab/backups
sudo chown git:root /var/opt/gitlab/backups

之后运行更新。

sudo yum install gitlab-ce

安装未更新,请参阅文档

相关内容