-
-
Save anonymous/99f2b4255f08858737b7 to your computer and use it in GitHub Desktop.
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
require 'rubygems' if RUBY_VERSION < '1.9' | |
require 'date' | |
require 'fileutils' | |
require 'net/ssh' | |
require 'open3' | |
class CommandFailed < StandardError | |
end | |
class BackupMysql < StandardError | |
def initialize(uid_instance) | |
if uid_instance.nil? | |
puts "please give a uid instance to backup" | |
@uid_instance = gets.chomp | |
else | |
@uid_instance = uid_instance | |
@user ='root' | |
@uid_instance= ARGV[0] | |
@res_uid_instance= @uid_instance | |
@host ='192.168.160.44' | |
@pwd ="Linux_2306" | |
@mysl_dump ="/usr/bin/mysqldump" | |
@mysql_user = "root" | |
@mysql_password = "Linux_2306" | |
backup | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment