Migrating uploaded files to S3

I’m hosting my own Gitlab instance and after some time using it, I’m willing to move the uploaded files (files attached to issues/comments) to S3.

I know I can configure Gitlab to use an S3 bucket as object storage, but that won’t move the files that were already uploaded to the server’s FS.

How can I move those files to S3?

Have a look here https://docs.gitlab.com/ee/administration/raketasks/uploads/migrate.html