class Ariranha::Drivers::Postgresql
Attributes
pgsql_database[R]
pgsql_host[R]
pgsql_password[R]
pgsql_user[R]
Public Instance Methods
database()
click to toggle source
# File lib/ariranha/drivers/postgresql.rb, line 6 def database pgsql_database end
Private Instance Methods
backup_cmd()
click to toggle source
# File lib/ariranha/drivers/postgresql.rb, line 20 def backup_cmd envs = {} envs['PGPASSWORD'] = pgsql_password if pgsql_password cmd = 'pg_dump -Fc --no-acl --no-owner ' cmd += "--host=#{pgsql_host} " if pgsql_host cmd += "--username=#{pgsql_user} " if pgsql_user cmd += "#{pgsql_database} > /tmp/#{filename}" [envs, cmd] end
config_driver()
click to toggle source
# File lib/ariranha/drivers/postgresql.rb, line 14 def config_driver config.each do |k, v| instance_variable_set("@pgsql_#{k}".to_sym, v) end end
filename()
click to toggle source
# File lib/ariranha/drivers/postgresql.rb, line 30 def filename "#{pgsql_database}-#{timestamp}.dump" end