diff options
Diffstat (limited to 'lib/tasks/gitlab/backup.rake')
-rw-r--r-- | lib/tasks/gitlab/backup.rake | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/tasks/gitlab/backup.rake b/lib/tasks/gitlab/backup.rake index c53ef8382b8..5b17a8c185a 100644 --- a/lib/tasks/gitlab/backup.rake +++ b/lib/tasks/gitlab/backup.rake @@ -109,7 +109,7 @@ namespace :gitlab do puts "GITLAB_BACKUP_MAX_CONCURRENCY and GITLAB_BACKUP_MAX_STORAGE_CONCURRENCY must have a value of at least 1".color(:red) exit 1 else - Backup::Repositories.new(progress).dump( + Backup::Repositories.new(progress, strategy: repository_backup_strategy).dump( max_concurrency: max_concurrency, max_storage_concurrency: max_storage_concurrency ) @@ -119,7 +119,7 @@ namespace :gitlab do task restore: :gitlab_environment do puts_time "Restoring repositories ...".color(:blue) - Backup::Repositories.new(progress).restore + Backup::Repositories.new(progress, strategy: repository_backup_strategy).restore puts_time "done".color(:green) end end @@ -294,6 +294,14 @@ namespace :gitlab do $stdout end end + + def repository_backup_strategy + if Feature.enabled?(:gitaly_backup) + Backup::GitalyBackup.new(progress) + else + Backup::GitalyRpcBackup.new(progress) + end + end end # namespace end: backup end |