class Ariranha::Drivers::Mysql
Attributes
mysql_cert_path[R]
mysql_database[R]
mysql_host[R]
mysql_password[R]
mysql_ssl[R]
mysql_user[R]
Public Instance Methods
database()
click to toggle source
# File lib/ariranha/drivers/mysql.rb, line 6 def database mysql_database end
Private Instance Methods
backup_cmd()
click to toggle source
# File lib/ariranha/drivers/mysql.rb, line 21 def backup_cmd envs = {} cmd = "mysqldump -u#{mysql_user} " cmd += "-p#{mysql_password} " if mysql_password cmd += "--ssl_ca=#{mysql_cert_path} " if mysql_ssl cmd += '--single-transaction --routines --triggers '\ "-h #{mysql_host} #{mysql_database} "\ "| gzip -c > /tmp/#{filename}" [envs, cmd] end
config_driver()
click to toggle source
# File lib/ariranha/drivers/mysql.rb, line 15 def config_driver config.each do |k, v| instance_variable_set("@mysql_#{k}".to_sym, v) end end
filename()
click to toggle source
# File lib/ariranha/drivers/mysql.rb, line 32 def filename "#{mysql_database}-#{timestamp}.sql.gz" end