【问题标题】:How to move from gitalb source base to gitlab omnibus?如何从 gitlab 源码库迁移到 gitlab 综合库?
【发布时间】:2016-12-17 08:49:31
【问题描述】:

我正在尝试将 gitlab-ce 8.5 源代码库移动到 gitlab-ce 8.15 omnibus。我们使用MySQL in source base but now we have to use thepsql 和 gitlab-ce 综合`。当我试图进行备份时,由于一些空的仓库而失败。

问题:有没有其他方法可以将源库移动到带有完整备份的综合库?

【问题讨论】:

    标签: mysql postgresql gitlab-omnibus gitlab-ce


    【解决方案1】:

    我已将 gitlab 从源代码库移至综合库。您可以使用以下链接将 db dump 从 MySQL 转换为 psql。

    https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/update/mysql_to_postgresql.md

    我手动创建了一个 repos 的 zip 文件并复制到 gitlab 综合服务器并在 /var/opt/gitlab/git-data/repository/ 上恢复它。

    完成这些步骤后,将以下脚本复制到 /var/opt/gitlab/git-data/xyz.sh 并执行以更新挂钩。

    #!/bin/bash
    for i in repositories/* ; do
      if [ -d "$i" ]; then
        for o in $i/* ; do
         if [ -d "$i" ]; then
           rm "$o/hooks"
           # change the paths if required
           ln -s  "/opt/gitlab/embedded/service/gitlab-shell/hooks" /var/opt/gitlab/git-data/"$o"/hooks 
           echo "HOOKS CHANGED ($i/$o)"
         fi
        done
      fi
    done
    

    注意:repos 权限应该是 git:git

    迁移过程中一些有用的命令:

    sudo gitlab-ctl start postgres **to start the Postgres service only**
    
    sudo gitlab-psql **to use the gitlab bundle postgres.**
    

    如果您在 gitlab 页面上遇到 5xx 错误代码,请随时发表评论。

    【讨论】:

      猜你喜欢
      • 2018-06-18
      • 1970-01-01
      • 1970-01-01
      • 2016-08-08
      • 2015-06-28
      • 1970-01-01
      • 2021-11-15
      • 1970-01-01
      • 2020-02-20
      相关资源
      最近更新 更多