Class: Backup::Repositories
- Extended by:
- Gitlab::Utils::Override
- Defined in:
- lib/backup/repositories.rb
Instance Method Summary collapse
- #dump(path, backup_id) ⇒ Object
-
#initialize(progress, strategy:) ⇒ Repositories
constructor
A new instance of Repositories.
- #restore(path) ⇒ Object
Methods included from Gitlab::Utils::Override
extended, extensions, included, method_added, override, prepended, queue_verification, verify!
Methods inherited from Task
#post_restore_warning, #pre_restore_warning
Constructor Details
#initialize(progress, strategy:) ⇒ Repositories
Returns a new instance of Repositories.
9 10 11 12 13 |
# File 'lib/backup/repositories.rb', line 9 def initialize(progress, strategy:) super(progress) @strategy = strategy end |
Instance Method Details
#dump(path, backup_id) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/backup/repositories.rb', line 16 def dump(path, backup_id) strategy.start(:create, path, backup_id: backup_id) enqueue_consecutive ensure strategy.finish! end |
#restore(path) ⇒ Object
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/backup/repositories.rb', line 25 def restore(path) strategy.start(:restore, path) enqueue_consecutive ensure strategy.finish! cleanup_snippets_without_repositories restore_object_pools end |