summaryrefslogtreecommitdiff
path: root/doc/raketasks/cleanup.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/raketasks/cleanup.md')
-rw-r--r--doc/raketasks/cleanup.md20
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