Created
October 1, 2011 07:34
-
-
Save Winslett/1255731 to your computer and use it in GitHub Desktop.
Engine Yard Backup from RDS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r winslett.ey_cloud_server-1.4.24/lib/ey_backup/cli.rb /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/ey_cloud_server-1.4.24/lib/ey_backup/cli.rb | |
77a78,81 | |
> | |
> opts.on("-h", "--host HOSTNAME", "Remote hostname to connect, defaults to local") do |host| | |
> options[:host] = host | |
> end | |
diff -r winslett.ey_cloud_server-1.4.24/lib/ey_backup/engine.rb /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/ey_cloud_server-1.4.24/lib/ey_backup/engine.rb | |
6c6 | |
< attr_reader :username, :password | |
--- | |
> attr_reader :username, :password, :host | |
29,30c29,30 | |
< def initialize(username, password, key_id) | |
< @username, @password = username, password | |
--- | |
> def initialize(username, password, key_id, host = nil) | |
> @username, @password, @host = username, password, host | |
diff -r winslett.ey_cloud_server-1.4.24/lib/ey_backup/engines/mysql_engine.rb /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/ey_cloud_server-1.4.24/lib/ey_backup/engines/mysql_engine.rb | |
9c9 | |
< command = "mysqldump #{username_option} #{password_option} #{single_transaction_option(database_name)} #{database_name}" | |
--- | |
> command = "mysqldump #{username_option} #{password_option} #{host_option} #{single_transaction_option(database_name)} #{database_name}" | |
35c35 | |
< command << " | mysql #{username_option} #{password_option} #{database_name}" | |
--- | |
> command << " | mysql #{username_option} #{password_option} #{host_option} #{database_name}" | |
47a48,51 | |
> def host_option | |
> "-h'#{host}'" unless host.nil? || host.empty? | |
> end | |
> | |
54c58 | |
< spawn(%Q{mysql #{username_option} #{password_option} -N -e"#{query}"}, stdout) | |
--- | |
> spawn(%Q{mysql #{username_option} #{password_option} #{host_option} -N -e"#{query}"}, stdout) | |
diff -r winslett.ey_cloud_server-1.4.24/lib/ey_backup.rb /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/ey_cloud_server-1.4.24/lib/ey_backup.rb | |
90c90 | |
< @engine = engine_class.new(@options[:dbuser], @options[:dbpass], @options[:key_id]) | |
--- | |
> @engine = engine_class.new(@options[:dbuser], @options[:dbpass], @options[:key_id], @options[:host]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment