Commit dfa6e6e7 authored by Collen's avatar Collen Committed by Marcia Ramos

Remove terminal prompts to allow easy copying

parent e4c2209d
...@@ -141,18 +141,23 @@ There are two ways to manually do the same thing as automatic uploading (describ ...@@ -141,18 +141,23 @@ There are two ways to manually do the same thing as automatic uploading (describ
**Option 1: Rake task** **Option 1: Rake task**
```shell ```shell
rake gitlab:lfs:migrate gitlab-rake gitlab:lfs:migrate
``` ```
**Option 2: rails console** **Option 2: Rails console**
Log into the Rails console:
```shell ```shell
$ sudo gitlab-rails console # Login to rails console sudo gitlab-rails console
```
> # Upload LFS files manually Upload LFS files manually
> LfsObject.where(file_store: [nil, 1]).find_each do |lfs_object|
> lfs_object.file.migrate!(ObjectStorage::Store::REMOTE) if lfs_object.file.file.exists? ```ruby
> end LfsObject.where(file_store: [nil, 1]).find_each do |lfs_object|
lfs_object.file.migrate!(ObjectStorage::Store::REMOTE) if lfs_object.file.file.exists?
end
``` ```
### S3 for Omnibus installations ### S3 for Omnibus installations
...@@ -244,19 +249,29 @@ If LFS integration is configured with Google Cloud Storage and background upload ...@@ -244,19 +249,29 @@ If LFS integration is configured with Google Cloud Storage and background upload
Sidekiq workers may encounter this error. This is because the uploading timed out with very large files. Sidekiq workers may encounter this error. This is because the uploading timed out with very large files.
LFS files up to 6Gb can be uploaded without any extra steps, otherwise you need to use the following workaround. LFS files up to 6Gb can be uploaded without any extra steps, otherwise you need to use the following workaround.
Log into Rails console:
```shell ```shell
$ sudo gitlab-rails console # Login to rails console sudo gitlab-rails console
```
> # Set up timeouts. 20 minutes is enough to upload 30GB LFS files.
> # These settings are only in effect for the same session, i.e. they are not effective for sidekiq workers. Set up timeouts:
> ::Google::Apis::ClientOptions.default.open_timeout_sec = 1200
> ::Google::Apis::ClientOptions.default.read_timeout_sec = 1200 - These settings are only in effect for the same session. For example, they are not effective for Sidekiq workers.
> ::Google::Apis::ClientOptions.default.send_timeout_sec = 1200 - 20 minutes (1200 sec) is enough to upload 30GB LFS files:
> # Upload LFS files manually. This process does not use sidekiq at all. ```ruby
> LfsObject.where(file_store: [nil, 1]).find_each do |lfs_object| ::Google::Apis::ClientOptions.default.open_timeout_sec = 1200
> lfs_object.file.migrate!(ObjectStorage::Store::REMOTE) if lfs_object.file.file.exists? ::Google::Apis::ClientOptions.default.read_timeout_sec = 1200
> end ::Google::Apis::ClientOptions.default.send_timeout_sec = 1200
```
Upload LFS files manually (this process does not use Sidekiq at all):
```ruby
LfsObject.where(file_store: [nil, 1]).find_each do |lfs_object|
lfs_object.file.migrate!(ObjectStorage::Store::REMOTE) if lfs_object.file.file.exists?
end
``` ```
See more information in [!19581](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/19581) See more information in [!19581](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/19581)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment