summaryrefslogtreecommitdiff
path: root/doc/administration/raketasks
diff options
context:
space:
mode:
Diffstat (limited to 'doc/administration/raketasks')
-rw-r--r--doc/administration/raketasks/check.md31
-rw-r--r--doc/administration/raketasks/doctor.md5
-rw-r--r--doc/administration/raketasks/github_import.md5
-rw-r--r--doc/administration/raketasks/uploads/sanitize.md2
4 files changed, 35 insertions, 8 deletions
diff --git a/doc/administration/raketasks/check.md b/doc/administration/raketasks/check.md
index 15014fffd01..bdccd6d5fe9 100644
--- a/doc/administration/raketasks/check.md
+++ b/doc/administration/raketasks/check.md
@@ -148,9 +148,38 @@ above.
for the affected project(s).
If the issue persists, try triggering `gc` via the
-[Rails Console](../troubleshooting/navigating_gitlab_via_rails_console.md#starting-a-rails-console-session):
+[Rails Console](../operations/rails_console.md#starting-a-rails-console-session):
```ruby
p = Project.find_by_path("project-name")
Projects::HousekeepingService.new(p, :gc).execute
```
+
+### Delete references to missing remote uploads
+
+`gitlab-rake gitlab:uploads:check VERBOSE=1` detects remote objects that do not exist because they were
+deleted externally but their references still exist in the GitLab database.
+
+Example output with error message:
+
+```shell
+$ sudo gitlab-rake gitlab:uploads:check VERBOSE=1
+Checking integrity of Uploads
+- 100..434: Failures: 2
+- Upload: 100: Remote object does not exist
+- Upload: 101: Remote object does not exist
+Done!
+```
+
+To delete these references to remote uploads that were deleted externally, open the [GitLab Rails Console](../operations/rails_console.md#starting-a-rails-console-session) and run:
+
+```ruby
+uploads_deleted=0
+Upload.find_each do |upload|
+ next if upload.retrieve_uploader.file.exists?
+ uploads_deleted=uploads_deleted + 1
+ p upload ### allow verification before destroy
+ # p upload.destroy! ### uncomment to actually destroy
+end
+p "#{uploads_deleted} remote objects were destroyed."
+```
diff --git a/doc/administration/raketasks/doctor.md b/doc/administration/raketasks/doctor.md
index 62d0af70706..c97aa5a4de1 100644
--- a/doc/administration/raketasks/doctor.md
+++ b/doc/administration/raketasks/doctor.md
@@ -47,9 +47,8 @@ I, [2020-06-11T17:18:15.575711 #27148] INFO -- : Done!
### Verbose mode
-In order to get more detailed information about which
-rows and columns cannot be decrypted, you can pass a VERBOSE
-environment variable:
+To get more detailed information about which rows and columns can't be
+decrypted, you can pass a `VERBOSE` environment variable:
**Omnibus Installation**
diff --git a/doc/administration/raketasks/github_import.md b/doc/administration/raketasks/github_import.md
index a46a2b34687..7f673a2c850 100644
--- a/doc/administration/raketasks/github_import.md
+++ b/doc/administration/raketasks/github_import.md
@@ -2,9 +2,8 @@
> [Introduced]( https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/10308) in GitLab 9.1.
-In order to retrieve and import GitHub repositories, you will need a
-[GitHub personal access token](https://github.com/settings/tokens).
-A username should be passed as the second argument to the Rake task
+To retrieve and import GitHub repositories, you need a [GitHub personal access token](https://github.com/settings/tokens).
+A username should be passed as the second argument to the Rake task,
which will become the owner of the project. You can resume an import
with the same command.
diff --git a/doc/administration/raketasks/uploads/sanitize.md b/doc/administration/raketasks/uploads/sanitize.md
index 9586ab2c6f4..54aa62059cf 100644
--- a/doc/administration/raketasks/uploads/sanitize.md
+++ b/doc/administration/raketasks/uploads/sanitize.md
@@ -1,6 +1,6 @@
# Uploads sanitize Rake tasks **(CORE ONLY)**
-Since GitLab 11.9, EXIF data is automatically stripped from JPG or TIFF image uploads.
+In GitLab 11.9 and later, EXIF data is automatically stripped from JPG or TIFF image uploads.
EXIF data may contain sensitive information (for example, GPS location), so you
can remove EXIF data from existing images that were uploaded to an earlier version of GitLab.