我正在尝试将 gitlab-ce 8.5
源库移动到 gitlab-ce 8.15 综合
。我们在源代码库中使用 MySQL,但现在我们必须将 psql 与 gitlab-ce 综合使用。当我尝试进行备份时,由于一些空的存储库而失败。
问题:是否有其他方法可以将源库移动到具有完整备份的综合库?
最佳答案
我已将 gitlab 从源库移至综合库。您可以使用下面的链接将数据库转储从 MySQL 转换为 psql。
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/update/mysql_to_postgresql.md
我手动创建了一个存储库的 zip 文件,并将其复制到 gitlab 综合服务器并将其恢复到/var/opt/gitlab/git-data/repository/上。
完成这些步骤后,将以下脚本复制到/var/opt/gitlab/git-data/xyz.sh 并执行以更新 Hook 。
#!/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 错误代码,请随时发表评论。
关于mysql - 如何从 gitlab 源库迁移到 gitlab 综合库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41196891/