diff options
Diffstat (limited to 'lib/backup/gitaly_backup.rb')
-rw-r--r-- | lib/backup/gitaly_backup.rb | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/backup/gitaly_backup.rb b/lib/backup/gitaly_backup.rb index b688ff7f13b..93342e789e9 100644 --- a/lib/backup/gitaly_backup.rb +++ b/lib/backup/gitaly_backup.rb @@ -9,16 +9,14 @@ module Backup # @param [StringIO] progress IO interface to output progress # @param [Integer] max_parallelism max parallelism when running backups # @param [Integer] storage_parallelism max parallelism per storage (is affected by max_parallelism) - # @param [String] backup_id unique identifier for the backup def initialize(progress, max_parallelism: nil, storage_parallelism: nil, incremental: false, backup_id: nil) @progress = progress @max_parallelism = max_parallelism @storage_parallelism = storage_parallelism @incremental = incremental - @backup_id = backup_id end - def start(type, backup_repos_path) + def start(type, backup_repos_path, backup_id: nil) raise Error, 'already started' if started? command = case type @@ -37,7 +35,7 @@ module Backup args += ['-layout', 'pointer'] if type == :create args += ['-incremental'] if @incremental - args += ['-id', @backup_id] if @backup_id + args += ['-id', backup_id] if backup_id end end @@ -68,10 +66,6 @@ module Backup schedule_backup_job(repository, always_create: repo_type.project?) end - def parallel_enqueue? - false - end - private # Schedule a new backup job through a non-blocking JSON based pipe protocol @@ -104,6 +98,8 @@ module Backup end def bin_path + raise Error, 'gitaly-backup binary not found and gitaly_backup_path is not configured' unless Gitlab.config.backup.gitaly_backup_path.present? + File.absolute_path(Gitlab.config.backup.gitaly_backup_path) end end |