Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
dfa6e6e7
Commit
dfa6e6e7
authored
May 07, 2020
by
Collen
Committed by
Marcia Ramos
May 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove terminal prompts to allow easy copying
parent
e4c2209d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
19 deletions
+34
-19
doc/administration/lfs/index.md
doc/administration/lfs/index.md
+34
-19
No files found.
doc/administration/lfs/index.md
View file @
dfa6e6e7
...
...
@@ -141,18 +141,23 @@ There are two ways to manually do the same thing as automatic uploading (describ
**Option 1: Rake task**
```
shell
rake gitlab:lfs:migrate
gitlab-
rake gitlab:lfs:migrate
```
**Option 2: rails console**
**Option 2: Rails console**
Log into the Rails console:
```
shell
$
sudo
gitlab-rails console
# Login to rails console
sudo
gitlab-rails console
```
>
# 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?
>
end
Upload LFS files manually
```
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
```
### S3 for Omnibus installations
...
...
@@ -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.
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
$
sudo
gitlab-rails console
# Login to 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.
>
::Google::Apis::ClientOptions.default.open_timeout_sec
=
1200
>
::Google::Apis::ClientOptions.default.read_timeout_sec
=
1200
>
::Google::Apis::ClientOptions.default.send_timeout_sec
=
1200
>
# Upload LFS files manually. This process does not use sidekiq at all.
>
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
sudo
gitlab-rails console
```
Set up timeouts:
-
These settings are only in effect for the same session. For example, they are not effective for Sidekiq workers.
-
20 minutes (1200 sec) is enough to upload 30GB LFS files:
```
ruby
::
Google
::
Apis
::
ClientOptions
.
default
.
open_timeout_sec
=
1200
::
Google
::
Apis
::
ClientOptions
.
default
.
read_timeout_sec
=
1200
::
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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment