Class: SnapshotArchive::Stores::Mysql::Restore
- Inherits:
-
Object
- Object
- SnapshotArchive::Stores::Mysql::Restore
- Defined in:
- lib/snapshot_archive/stores.rb
Instance Attribute Summary collapse
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(metadata:) ⇒ Restore
constructor
A new instance of Restore.
Constructor Details
#initialize(metadata:) ⇒ Restore
Returns a new instance of Restore.
74 75 76 |
# File 'lib/snapshot_archive/stores.rb', line 74 def initialize(metadata:) = end |
Instance Attribute Details
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
73 74 75 |
# File 'lib/snapshot_archive/stores.rb', line 73 def end |
Class Method Details
.call ⇒ Object
69 70 71 |
# File 'lib/snapshot_archive/stores.rb', line 69 def self.call(...) new(...).call end |
Instance Method Details
#call ⇒ Object
78 79 80 81 82 |
# File 'lib/snapshot_archive/stores.rb', line 78 def call dump_path = .dig("path") Cfg.shell.debug("restoring #{metadata.to_json}") Cfg.shell.run("bash -ec 'zcat < #{dump_path} | mysql -uroot'") end |