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
4a71440b
Commit
4a71440b
authored
Jul 28, 2021
by
James Fargher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use gitaly-backup for repository backups by default
Changelog: changed
parent
e6234a15
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
2 deletions
+46
-2
config/feature_flags/development/gitaly_backup.yml
config/feature_flags/development/gitaly_backup.yml
+1
-1
doc/raketasks/backup_restore.md
doc/raketasks/backup_restore.md
+44
-0
lib/tasks/gitlab/backup.rake
lib/tasks/gitlab/backup.rake
+1
-1
No files found.
config/feature_flags/development/gitaly_backup.yml
View file @
4a71440b
...
@@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/333034
...
@@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/333034
milestone
:
'
14.0'
milestone
:
'
14.0'
type
:
development
type
:
development
group
:
group::gitaly
group
:
group::gitaly
default_enabled
:
fals
e
default_enabled
:
tru
e
doc/raketasks/backup_restore.md
View file @
4a71440b
...
@@ -1472,3 +1472,47 @@ If this happens, examine the following:
...
@@ -1472,3 +1472,47 @@ If this happens, examine the following:
-
Confirm there is sufficient disk space for the Gzip operation.
-
Confirm there is sufficient disk space for the Gzip operation.
-
If NFS is being used, check if the mount option
`timeout`
is set. The
-
If NFS is being used, check if the mount option
`timeout`
is set. The
default is
`600`
, and changing this to smaller values results in this error.
default is
`600`
, and changing this to smaller values results in this error.
### `gitaly-backup` for repository backup and restore **(FREE SELF)**
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/333034) in GitLab 14.2.
> - [Deployed behind a feature flag](../user/feature_flags.md), enabled by default.
> - Recommended for production use.
> - For GitLab self-managed instances, GitLab administrators can opt to [disable it](#disable-or-enable-gitaly-backup).
There can be
[
risks when disabling released features
](
../user/feature_flags.md#risks-when-disabling-released-features
)
.
Refer to this feature's version history for more details.
`gitaly-backup`
is used by the backup Rake task to create and restore repository backups from Gitaly.
`gitaly-backup`
replaces the previous backup method that directly calls RPCs on Gitaly from GitLab.
The backup Rake task must be able to find this executable. It can be configured in Omnibus GitLab packages:
1.
Add the following to
`/etc/gitlab/gitlab.rb`
:
```
ruby
gitlab_rails
[
'backup_gitaly_backup_path'
]
=
'/path/to/gitaly-backup'
```
1.
[
Reconfigure GitLab
](
../administration/restart_gitlab.md#omnibus-gitlab-reconfigure
)
for the changes to take effect
#### Disable or enable `gitaly-backup`
`gitaly-backup`
is under development but ready for production use.
It is deployed behind a feature flag that is
**enabled by default**
.
[
GitLab administrators with access to the GitLab Rails console
](
../administration/feature_flags.md
)
can opt to disable it.
To disable it:
```
ruby
Feature
.
disable
(
:gitaly_backup
)
```
To enable it:
```
ruby
Feature
.
enable
(
:gitaly_backup
)
```
lib/tasks/gitlab/backup.rake
View file @
4a71440b
...
@@ -297,7 +297,7 @@ namespace :gitlab do
...
@@ -297,7 +297,7 @@ namespace :gitlab do
end
end
def
repository_backup_strategy
def
repository_backup_strategy
if
Feature
.
enabled?
(
:gitaly_backup
)
if
Feature
.
enabled?
(
:gitaly_backup
,
default_enabled: :yaml
)
max_concurrency
=
ENV
[
'GITLAB_BACKUP_MAX_CONCURRENCY'
].
presence
max_concurrency
=
ENV
[
'GITLAB_BACKUP_MAX_CONCURRENCY'
].
presence
max_storage_concurrency
=
ENV
[
'GITLAB_BACKUP_MAX_STORAGE_CONCURRENCY'
].
presence
max_storage_concurrency
=
ENV
[
'GITLAB_BACKUP_MAX_STORAGE_CONCURRENCY'
].
presence
Backup
::
GitalyBackup
.
new
(
progress
,
parallel:
max_concurrency
,
parallel_storage:
max_storage_concurrency
)
Backup
::
GitalyBackup
.
new
(
progress
,
parallel:
max_concurrency
,
parallel_storage:
max_storage_concurrency
)
...
...
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