diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 06:08:29 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 06:08:29 +0000 |
commit | 654859099919ed5fd1896956460ba00568a2d90e (patch) | |
tree | 94b7ac45a50f75d674dc9a32d24639bee73bf8ed /lib/backup/manager.rb | |
parent | 5ea8a46ef44de37afd98447e8a38f36f925d0af8 (diff) | |
download | gitlab-ce-654859099919ed5fd1896956460ba00568a2d90e.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/backup/manager.rb')
-rw-r--r-- | lib/backup/manager.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/backup/manager.rb b/lib/backup/manager.rb index a19fcd6fede..6e90824fce2 100644 --- a/lib/backup/manager.rb +++ b/lib/backup/manager.rb @@ -21,6 +21,7 @@ module Backup max_concurrency = ENV.fetch('GITLAB_BACKUP_MAX_CONCURRENCY', 1).to_i max_storage_concurrency = ENV.fetch('GITLAB_BACKUP_MAX_STORAGE_CONCURRENCY', 1).to_i force = ENV['force'] == 'yes' + incremental = Gitlab::Utils.to_boolean(ENV['INCREMENTAL'], default: false) @definitions = definitions || { 'db' => TaskDefinition.new( @@ -32,7 +33,7 @@ module Backup destination_path: 'repositories', destination_optional: true, task: Repositories.new(progress, - strategy: repository_backup_strategy, + strategy: repository_backup_strategy(incremental), max_concurrency: max_concurrency, max_storage_concurrency: max_storage_concurrency) ), @@ -481,11 +482,11 @@ module Backup Gitlab.config.backup.upload.connection&.provider&.downcase == 'google' end - def repository_backup_strategy + def repository_backup_strategy(incremental) if Feature.enabled?(:gitaly_backup, default_enabled: :yaml) max_concurrency = ENV['GITLAB_BACKUP_MAX_CONCURRENCY'].presence max_storage_concurrency = ENV['GITLAB_BACKUP_MAX_STORAGE_CONCURRENCY'].presence - Backup::GitalyBackup.new(progress, max_parallelism: max_concurrency, storage_parallelism: max_storage_concurrency) + Backup::GitalyBackup.new(progress, incremental: incremental, max_parallelism: max_concurrency, storage_parallelism: max_storage_concurrency) else Backup::GitalyRpcBackup.new(progress) end |