Class: DB2Fog::MysqlAdaptor

Inherits:
BaseAdaptor show all
Defined in:
lib/db2fog.rb

Instance Method Summary collapse

Methods inherited from BaseAdaptor

#dump, #initialize, #run

Constructor Details

This class inherits a constructor from DB2Fog::BaseAdaptor

Instance Method Details

#dump_command(dump_file) ⇒ Object



110
111
112
113
# File 'lib/db2fog.rb', line 110

def dump_command(dump_file)
  cmd = "mysqldump --quick --single-transaction --create-options #{mysql_options}"
  cmd += " | gzip -9 > #{dump_file.path}"
end

#restore(path) ⇒ Object



115
116
117
# File 'lib/db2fog.rb', line 115

def restore(path)
  run "gunzip -c #{path} | mysql #{mysql_options}"
end