diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-27 00:08:34 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-27 00:08:34 +0000 |
commit | 17f6b320a11fc5bc1261994a7a93b34096e365e3 (patch) | |
tree | d81697c28fa4e84e3bcc28c53d22e14c4bd1300f /lib/backup/manager.rb | |
parent | 1c47c8e2d613829993eafb59a903223389389d86 (diff) | |
download | gitlab-ce-17f6b320a11fc5bc1261994a7a93b34096e365e3.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/backup/manager.rb')
-rw-r--r-- | lib/backup/manager.rb | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/lib/backup/manager.rb b/lib/backup/manager.rb index f249becb8f9..16b8f21c9e9 100644 --- a/lib/backup/manager.rb +++ b/lib/backup/manager.rb @@ -11,7 +11,8 @@ module Backup LIST_ENVS = { skipped: 'SKIP', - repositories_storages: 'REPOSITORIES_STORAGES' + repositories_storages: 'REPOSITORIES_STORAGES', + repositories_paths: 'REPOSITORIES_PATHS' }.freeze TaskDefinition = Struct.new( @@ -190,7 +191,11 @@ module Backup max_storage_concurrency = ENV['GITLAB_BACKUP_MAX_STORAGE_CONCURRENCY'].presence strategy = Backup::GitalyBackup.new(progress, incremental: incremental?, max_parallelism: max_concurrency, storage_parallelism: max_storage_concurrency) - Repositories.new(progress, strategy: strategy, storages: repositories_storages) + Repositories.new(progress, + strategy: strategy, + storages: list_env(:repositories_storages), + paths: list_env(:repositories_paths) + ) end def build_files_task(app_files_dir, excludes: []) @@ -266,7 +271,8 @@ module Backup tar_version: tar_version, installation_type: Gitlab::INSTALLATION_TYPE, skipped: ENV['SKIP'], - repositories_storages: ENV['REPOSITORIES_STORAGES'] + repositories_storages: ENV['REPOSITORIES_STORAGES'], + repositories_paths: ENV['REPOSITORIES_PATHS'] } end @@ -279,7 +285,8 @@ module Backup tar_version: tar_version, installation_type: Gitlab::INSTALLATION_TYPE, skipped: list_env(:skipped).join(','), - repositories_storages: list_env(:repositories_storages).join(',') + repositories_storages: list_env(:repositories_storages).join(','), + repositories_paths: list_env(:repositories_paths).join(',') ) end @@ -472,10 +479,6 @@ module Backup @skipped ||= list_env(:skipped) end - def repositories_storages - @repositories_storages ||= list_env(:repositories_storages) - end - def list_env(name) list = ENV.fetch(LIST_ENVS[name], '').split(',') list += backup_information[name].split(',') if backup_information[name] |