Module: DumpHelper
- Defined in:
- lib/db/dump_helper.rb
Class Method Summary collapse
- .dump_on_container_and_download(container) ⇒ Object
- .dump_on_local ⇒ Object
- .dump_on_server_and_download ⇒ Object
Class Method Details
.dump_on_container_and_download(container) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/db/dump_helper.rb', line 20 def self.dump_on_container_and_download(container) args = Helper::mysql_dump_args container.execute("mysqldump #{args} > #{fetch(:db_remote_dump)}") container.download!(fetch(:db_remote_dump), fetch(:db_local_dump)) end |
.dump_on_local ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/db/dump_helper.rb', line 4 def self.dump_on_local() args = Helper::mysql_dump_args run_locally do execute "mysqldump #{args} > #{fetch(:db_local_dump)}" end end |
.dump_on_server_and_download ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/db/dump_helper.rb', line 12 def self.dump_on_server_and_download() args = Helper::mysql_dump_args execute "mysqldump #{args} > #{fetch(:db_remote_dump)}" download!(fetch(:db_remote_dump), fetch(:db_local_dump)) end |