Skip to content

Commit

Permalink
Merge pull request #113 from genesis/110-single-quotes-escaping
Browse files Browse the repository at this point in the history
[RFC] Password escaping for mysql dumps
  • Loading branch information
ericclemmons committed May 12, 2014
2 parents 065773e + 803f75b commit ba673ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deployment/lib/sync.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
set :backup_path, "#{backup_dir}/#{backup_name}"

system "vagrant up"
system "vagrant ssh local -c 'cd /vagrant && mysqldump -u\"#{db_user}\" -p\"#{db_password}\" --opt --databases \"#{db_name}\" | gzip --rsyncable > #{backup_name}.gz'"
system "vagrant ssh local -c 'cd /vagrant && mysqldump -u\"#{db_user}\" -p\"#{db_password.gsub('$', '\$')}\" --opt --databases \"#{db_name}\" | gzip --rsyncable > #{backup_name}.gz'"

run "mkdir -p #{backup_dir}"
top.upload "#{backup_name}.gz", "#{backup_path}.gz", :via => :scp
Expand Down

0 comments on commit ba673ce

Please sign in to comment.