Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

also use host when local, development db servers are not always local…

…host
  • Loading branch information...
commit e4d95476271daee5f65641bfd5b24d77e12c0ff2 1 parent c3ea015
Cas Ebbers authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 recipes/deploy.rb
View
4 recipes/deploy.rb
@@ -8,7 +8,7 @@
run "mysqldump --opt --quick --extended-insert --skip-lock-tables -u #{db_remote['username']} --password='#{db_remote['password']}' -h #{db_remote['host']} #{db_remote['database']} | gzip > #{dumpfile}"
system "rsync -vP #{user}@#{deploy_host}:#{dumpfile} tmp/#{db_local["database"]}.sql.gz"
- system "gunzip < tmp/#{db_local["database"]}.sql.gz | mysql -u #{db_local['username']} --password='#{db_local['password']}' #{db_local['database']}"
+ system "gunzip < tmp/#{db_local["database"]}.sql.gz | mysql -u #{db_local['username']} --password='#{db_local['password']}' -h #{db_local['host']} #{db_local['database']}"
end
desc 'Fetch the assets from the production server to the development environment'
@@ -20,7 +20,7 @@
namespace :put do
desc 'Upload the local development database to the remote production database and overwrite it'
task :mysql, :roles => :db do
- system "mysqldump --opt -u #{db_local['username']} --password='#{db_local['password']}' #{db_local['database']} > tmp/#{db_local['database']}.sql"
+ system "mysqldump --opt -u #{db_local['username']} --password='#{db_local['password']}' -h #{db_local['host']} #{db_local['database']} > tmp/#{db_local['database']}.sql"
system "rsync -vP tmp/#{db_local['database']}.sql #{user}@#{deploy_host}:#{dumpfile}"
run "mysql -u #{db_remote['username']} --password='#{db_remote['password']}' -h #{db_remote['host']} #{db_remote['database']} < #{dumpfile}"
Please sign in to comment.
Something went wrong with that request. Please try again.