Class: DevArchive::Stores::Mysql::Restore

Inherits:
Object
  • Object
show all
Defined in:
lib/dev_archive/stores.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(metadata) ⇒ Restore

Returns a new instance of Restore.



62
63
64
# File 'lib/dev_archive/stores.rb', line 62

def initialize()
  @metadata = 
end

Instance Attribute Details

#metadataObject (readonly)

Returns the value of attribute metadata.



61
62
63
# File 'lib/dev_archive/stores.rb', line 61

def 
  @metadata
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

#callObject



66
67
68
69
70
# File 'lib/dev_archive/stores.rb', line 66

def call
  dump_path = .dig("path")
  Cfg.shell.puts "restoring #{.to_json}"
  Cfg.shell.run("bash -ec 'zcat < #{dump_path} | mysql -uroot'")
end