How to backup package registry in Gitlab

Viewed 371

I using self-managed GitLab to manage many java application. I also use gitlab package registry to store the artifacts (jar file) and use AWS S3 as the storage path. My company want to setup a plan for the gitlab backup. 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

I don't know when I restore gitlab with new instance, the new package registry will recognize my packages in S3?

Anyone has exp about this, please advise me. Thanks a lot!!!

1 Answers

Since you are storing your artifacts on S3, I believe they should just be available when you restore from backup. The new instance would still be pointing at the same S3 bucket. You should make sure the S3 retention polices are appropriate for your backup needs.

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. 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.

There is an open ticket for this in the Gitlab issue tracker, which is where I found the above workaround.

Related