module Capistrano::Container::DB::DumpHelper
Public Class Methods
dump_on_container_and_download(container)
click to toggle source
# 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()
click to toggle source
# 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()
click to toggle source
# 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