我正在尝试将gitlab-ce 8.5
源代码库移至gitlab-ce 8.15 omnibus
. 我们使用MySQL in source base but now we have to use the
psql 和 gitlab-ce 综合`。当我试图进行备份时,由于一些空的仓库而失败。
问题:是否有任何替代方法可以将源库移动到具有完整备份的综合?
我正在尝试将gitlab-ce 8.5
源代码库移至gitlab-ce 8.15 omnibus
. 我们使用MySQL in source base but now we have to use the
psql 和 gitlab-ce 综合`。当我试图进行备份时,由于一些空的仓库而失败。
问题:是否有任何替代方法可以将源库移动到具有完整备份的综合?
我已将 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 错误代码,请随时发表评论。