Class: DevArchive::Stores::Mysql::Restore
- Inherits:
-
Object
- Object
- DevArchive::Stores::Mysql::Restore
- Defined in:
- lib/dev_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.
62 63 64 |
# File 'lib/dev_archive/stores.rb', line 62 def initialize() = end |
Instance Attribute Details
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
61 62 63 |
# File 'lib/dev_archive/stores.rb', line 61 def end |
Class Method Details
.call(metadata) ⇒ Object
57 58 59 |
# File 'lib/dev_archive/stores.rb', line 57 def self.call() new().call end |
Instance Method Details
#call ⇒ Object
66 67 68 69 70 |
# File 'lib/dev_archive/stores.rb', line 66 def call dump_path = .dig("path") Cfg.shell.puts "restoring #{metadata.to_json}" Cfg.shell.run("bash -ec 'zcat < #{dump_path} | mysql -uroot'") end |