class Dumpman::Adapters::Mysql

Public Instance Methods

create_cmd() click to toggle source
# File lib/dumpman/adapters/mysql.rb, line 16
def create_cmd
  "MYSQL_PWD='#{password}' mysql -u #{username} -h #{host} -e 'create database #{database}'"
end
drop_cmd() click to toggle source
# File lib/dumpman/adapters/mysql.rb, line 12
def drop_cmd
  "MYSQL_PWD='#{password}' mysql -u #{username} -h #{host} -e 'drop database #{database}'"
end
dump_cmd() click to toggle source
# File lib/dumpman/adapters/mysql.rb, line 4
def dump_cmd
  "MYSQL_PWD='#{password}' mysqldump -u #{username} -h #{host} #{database} | gzip -9 > #{Dumpman.dump_file}"
end
restore_cmd() click to toggle source
# File lib/dumpman/adapters/mysql.rb, line 8
def restore_cmd
  "gunzip < #{Dumpman.dump_file} | MYSQL_PWD='#{password}' mysql -u #{username} -h #{host} #{database}"
end