For Omnibus installations, one can do gitlab-rake gitlab:lfs:migrate to migrate existing LFS objects to object storage. I was wondering if this was done automatically if I enable GITLAB_LFS_OBJECT_STORE_ENABLED and if not, how to achieve this.
Same questions for
GITLAB_ARTIFACTS_OBJECT_STORE_ENABLEDGITLAB_UPLOADS_OBJECT_STORE_ENABLEDCheers!
No, It doesnt migrate old artifacts and uploads automatic, it'll use for the new ones
To migrate the old one's you need to run a rake task, like this:
sudo -u git -H bundle exec rake gitlab:uploads:migrate:all RAILS_ENV=production
Thank you. I did that and the assets are indeed migrated to GitLab. Do you happen to know the upload schedule for background uploads?
I see object_storage:object_storage_background_move and object_storage:object_storage_migrate_uploads queues in https://mygitlabinstance/admin/background_jobs but they are of size 0 and my new LFS objects are not being migrated, even after more than 24 hours. Any ideas how to debug this?
For anyone wondering, by default GITLAB_LFS_OBJECT_STORE_BACKGROUND_UPLOAD is set to false in this repository https://github.com/sameersbn/docker-gitlab/blob/13e856141ec14eff47569bb765a08cd1ea7d0f8d/assets/runtime/env-defaults#L121
This does not match GitLab's default: https://docs.gitlab.com/ee/workflow/lfs/lfs_administration.html#storing-lfs-objects-in-remote-object-storage
(also mentionned here: https://github.com/sameersbn/docker-gitlab/blob/13e856141ec14eff47569bb765a08cd1ea7d0f8d/assets/runtime/config/gitlabhq/gitlab.yml#L186 )
if you enable direct_uploads there's no need to enable background_upload, cuz thats nothingo to upload in background :)
GITLAB_LFS_OBJECT_STORE_DIRECT_UPLOAD is also set to false by default (and undocumented on the README.md (I can do a PR if that would be helpful)).
I feel like GITLAB_LFS_OBJECT_STORE_BACKGROUND_UPLOAD should default to true, thoughts @leslau ?
Most helpful comment
No, It doesnt migrate old artifacts and uploads automatic, it'll use for the new ones
To migrate the old one's you need to run a rake task, like this: