Module: Capistrano::Container::DB::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
25 26 27 28 29 30 31 |
# File 'lib/db/dump_helper.rb', line 25 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
7 8 9 10 11 12 13 |
# File 'lib/db/dump_helper.rb', line 7 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
15 16 17 18 19 20 21 22 23 |
# File 'lib/db/dump_helper.rb', line 15 def self.dump_on_server_and_download() args = Helper::mysql_dump_args on roles(:db, :container_host) do |host| execute "mysqldump #{args} > #{fetch(:db_remote_dump)}" download!(fetch(:db_remote_dump), fetch(:db_local_dump)) end end |