Class: Backhoe::Postgresql
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Instance Method Details
#dump(**_) ⇒ Object
81 82 83 84 85 |
# File 'lib/backhoe.rb', line 81 def dump **_ pg_dump = `which pg_dump`.strip raise RuntimeError, "Cannot find pg_dump." if pg_dump.blank? sh "#{pg_dump} -c -f#{file_path} #{database}" end |
#load ⇒ Object
87 88 89 90 91 |
# File 'lib/backhoe.rb', line 87 def load psql = `which psql`.strip raise RuntimeError, "Cannot find psql." if psql.blank? sh "#{psql} -q -d#{database} -f#{file_path}" end |