Class: DB2Fog::MysqlAdaptor
Instance Method Summary
collapse
Methods inherited from BaseAdaptor
#dump, #initialize, #run
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
|