简体   繁体   English

如何在 Gitlab 中备份 package 注册表

[英]How to backup package registry in Gitlab

I using self-managed GitLab to manage many java application.我使用自我管理的 GitLab 来管理许多 java 应用程序。 I also use gitlab package registry to store the artifacts (jar file) and use AWS S3 as the storage path.我还使用 gitlab package 注册表来存储工件(jar 文件)并使用 AWS S3 作为存储路径。 My company want to setup a plan for the gitlab backup.我的公司想为 gitlab 备份设置一个计划。 I review gitlab document: https://docs.gitlab.com/ee/raketasks/backup_restore.html . I review gitlab document: https://docs.gitlab.com/ee/raketasks/backup_restore.html . I don't see any mention relate to how we can backup the packages in package registry我没有看到任何关于我们如何备份 package 注册表中的包的信息

I don't know when I restore gitlab with new instance, the new package registry will recognize my packages in S3?我不知道当我用新实例恢复 gitlab 时,新的 package 注册表会识别我在 S3 中的包吗?

Anyone has exp about this, please advise me.有人对此有经验,请告诉我。 Thanks a lot!!!非常感谢!!!

Since you are storing your artifacts on S3, I believe they should just be available when you restore from backup.由于您将工件存储在 S3 上,我相信它们应该只在您从备份恢复时可用。 The new instance would still be pointing at the same S3 bucket.新实例仍将指向同一个 S3 存储桶。 You should make sure the S3 retention polices are appropriate for your backup needs.您应该确保 S3 保留策略适合您的备份需求。

If you are storing your packages on the local filesystem, the Gitlab backup process doesn't currently include those files, though it does include the package metadata.如果您将包存储在本地文件系统上,则 Gitlab 备份过程当前不包含这些文件,但它确实包含 package 元数据。 In that case, you'll need to manually copy the packages directory at /var/opt/gitlab/gitlab-rails/shared/packages/ to the new server after restoring the metadata using the normal backup/restore process.在这种情况下,您需要在使用正常的备份/恢复过程恢复元数据后,手动将/var/opt/gitlab/gitlab-rails/shared/packages/中的包目录复制到新服务器。

There is an open ticket for this in the Gitlab issue tracker, which is where I found the above workaround.在 Gitlab 问题跟踪器中有一个公开的票证,这是我找到上述解决方法的地方。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM