Method: Myq::Core#restore
- Defined in:
- lib/myq/core.rb
#restore(filepath = "#{@profile['database']}.dump") ⇒ Object
230 231 232 233 234 235 236 237 238 239 240 241 |
# File 'lib/myq/core.rb', line 230 def restore(filepath = "#{@profile['database']}.dump") cmd = " mysql -A\\\n -u \#{@profile['username']}\\\n -h \#{@profile['host']}\\\n -p \#{@profile['database']}\\\n --password='\#{@profile['password']}'\\\n --default-character-set=binary\\\n -f < \#{filepath}\n EOF\n system(cmd)\nend\n" |