Gitlab Backup Error: pack-objects died of signal 9

Gitlab Backup Error: pack-objects died of signal 9

我有一个包含 2 个分支的存储库,大小为 3.5GB。每个分支大约 1.5GB(.git 本身是 700MB)。

这是错误:

Backup failed

[FAILED]

failed: /opt/gitlab/embedded/bin/git --git-dir=/mountdata/gitlab/git-data/repositories/my-Project/my-git.git bundle create /mountdata/gitlab/backups/repositories/my-Project/my-git.bundle --all

error: pack-objects died of signal 9

error: pack-objects died

由于我的服务器只有4G内存,我的假设是每次备份时备份代码都用完了内存。

有没有更好的备份方式?也许一次一个分支以防止 运行 内存不足?

目前,我的 cron 作业中的命令是:

0 2 * * * /opt/gitlab/bin/gitlab-rake gitlab:backup:create CRON=1         
15 04 * * 1-7  umask 0077; tar cfz /secret/gitlab/backups/$(date "+etc-gitlab-\%s.tgz") -C / etc/gitlab

我认为你的假设是正确的。可能的解决方案是

  1. 运行 git 备份前重新打包
  2. 添加更多 RAM
  3. 直接使用tar代替git捆绑
  4. 将 gitlab 更新到最新版本也可能有帮助(不确定)

    See this