diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 15:26:25 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 15:26:25 +0300 |
commit | a09983ae35713f5a2bbb100981116d31ce99826e (patch) | |
tree | 2ee2af7bd104d57086db360a7e6d8c9d5d43667a /doc/raketasks/cleanup.md | |
parent | 18c5ab32b738c0b6ecb4d0df3994000482f34bd8 (diff) |
Add latest changes from gitlab-org/gitlab@13-2-stable-ee
Diffstat (limited to 'doc/raketasks/cleanup.md')
-rw-r--r-- | doc/raketasks/cleanup.md | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/doc/raketasks/cleanup.md b/doc/raketasks/cleanup.md index 5bdae998ec9..cf4edea383b 100644 --- a/doc/raketasks/cleanup.md +++ b/doc/raketasks/cleanup.md @@ -2,7 +2,7 @@ GitLab provides Rake tasks for cleaning up GitLab instances. -## Remove unreferenced LFS files from filesystem +## Remove unreferenced LFS files > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/36628) in GitLab 12.10. @@ -42,7 +42,7 @@ Note that this Rake task only removes the references to LFS files. Unreferenced later (once a day). If you need to garbage collect them immediately, run `rake gitlab:cleanup:orphan_lfs_files` described below. -## Remove unreferenced LFS files +### Remove unreferenced LFS files immediately > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/36628) in GitLab 12.10. @@ -64,7 +64,11 @@ $ sudo gitlab-rake gitlab:cleanup:orphan_lfs_files I, [2020-01-08T20:51:17.148765 #43765] INFO -- : Removed unreferenced LFS files: 12 ``` -## Remove garbage from filesystem +## Clean up project upload files + +Clean up project upload files if they don't exist in GitLab database. + +### Clean up project upload files from filesystem > [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/20863) in GitLab 11.2. @@ -100,11 +104,11 @@ I, [2018-07-27T12:08:33.755624 #89817] INFO -- : Did fix /opt/gitlab/embedded/s I, [2018-07-27T12:08:33.760257 #89817] INFO -- : Did move to lost and found /opt/gitlab/embedded/service/gitlab-rails/public/uploads/foo/bar/1dd6f0f7eefd2acc4c2233f89a0f7b0b/image.png -> /opt/gitlab/embedded/service/gitlab-rails/public/uploads/-/project-lost-found/foo/bar/1dd6f0f7eefd2acc4c2233f89a0f7b0b/image.png ``` -## Remove garbage from object storage +### Clean up project upload files from object storage > [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/20918) in GitLab 11.2. -Remove object store upload files if they don't exist in GitLab database. +Move object store upload files to a lost and found directory if they don't exist in GitLab database. ```shell # omnibus-gitlab @@ -142,7 +146,7 @@ When you notice there are more job artifacts files on disk than there should be, you can run: ```shell -gitlab-rake gitlab:cleanup:orphan_job_artifact_files +sudo gitlab-rake gitlab:cleanup:orphan_job_artifact_files ``` This command: @@ -156,13 +160,13 @@ delete. Run the command with `DRY_RUN=false` if you actually want to delete the files: ```shell -gitlab-rake gitlab:cleanup:orphan_job_artifact_files DRY_RUN=false +sudo gitlab-rake gitlab:cleanup:orphan_job_artifact_files DRY_RUN=false ``` You can also limit the number of files to delete with `LIMIT`: ```shell -gitlab-rake gitlab:cleanup:orphan_job_artifact_files LIMIT=100 +sudo gitlab-rake gitlab:cleanup:orphan_job_artifact_files LIMIT=100 ``` This will only delete up to 100 files from disk. You can use this to |