db_backups 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/db_backups +9 -10
- data/db_backups.gemspec +1 -1
- data/lib/db_backups/version.rb +1 -1
- metadata +5 -5
data/bin/db_backups
CHANGED
@@ -17,21 +17,20 @@ class DbBackups::CLI < Optitron::CLI
|
|
17
17
|
end
|
18
18
|
|
19
19
|
desc 'Show backup (defaults to last)'
|
20
|
-
|
21
|
-
|
22
|
-
p container[index]
|
20
|
+
def show(i_int=-1)
|
21
|
+
p container[i_int]
|
23
22
|
end
|
24
23
|
|
25
24
|
desc 'Get backup (defaults to last)'
|
26
25
|
arg_types :numeric
|
27
|
-
def get(
|
28
|
-
puts cat(container[
|
26
|
+
def get(i_int=-1)
|
27
|
+
puts cat(container[i_int])
|
29
28
|
end
|
30
29
|
|
31
30
|
desc 'Load backup'
|
32
31
|
arg_types :numeric
|
33
|
-
def load(
|
34
|
-
backup = container[
|
32
|
+
def load(i_int=-1)
|
33
|
+
backup = container[i_int]
|
35
34
|
print "Loading backup #{backup.inspect} into database #{database} ... "
|
36
35
|
p cmd = "mysql -u#{username} -p#{password} #{database}"
|
37
36
|
Open3.popen3(cmd) do |stdin, stdout, stderr|
|
@@ -41,9 +40,9 @@ class DbBackups::CLI < Optitron::CLI
|
|
41
40
|
end
|
42
41
|
|
43
42
|
desc 'Retrieve backup (defaults to last)'
|
44
|
-
|
45
|
-
|
46
|
-
backup = container[
|
43
|
+
def retrieve(i_int=-1)
|
44
|
+
puts "i_int = #{i_int.inspect}"
|
45
|
+
backup = container[i_int]
|
47
46
|
f_name = backup.to_s
|
48
47
|
print "Retrieving backup #{backup} ... "
|
49
48
|
File.open(f_name, 'w') do |f|
|
data/db_backups.gemspec
CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |gem|
|
|
11
11
|
gem.version = DbBackups::VERSION
|
12
12
|
gem.authors = ["Chris"]
|
13
13
|
gem.email = ["chris@locomote.com"]
|
14
|
-
gem.description = %q{
|
14
|
+
gem.description = %q{CLI for Rackspace Cloud File MySQL backups}
|
15
15
|
gem.summary = gem.description
|
16
16
|
|
17
17
|
gem.files = `git ls-files | grep -vE '(jenkins|.gitmodules|.ruby-version)'`.split("\n")
|
data/lib/db_backups/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: db_backups
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -75,7 +75,7 @@ dependencies:
|
|
75
75
|
- - ! '>='
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: '0'
|
78
|
-
description:
|
78
|
+
description: CLI for Rackspace Cloud File MySQL backups
|
79
79
|
email:
|
80
80
|
- chris@locomote.com
|
81
81
|
executables:
|
@@ -108,7 +108,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
108
108
|
version: '0'
|
109
109
|
segments:
|
110
110
|
- 0
|
111
|
-
hash:
|
111
|
+
hash: 356507004815840428
|
112
112
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
113
113
|
none: false
|
114
114
|
requirements:
|
@@ -117,11 +117,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
117
|
version: '0'
|
118
118
|
segments:
|
119
119
|
- 0
|
120
|
-
hash:
|
120
|
+
hash: 356507004815840428
|
121
121
|
requirements: []
|
122
122
|
rubyforge_project:
|
123
123
|
rubygems_version: 1.8.24
|
124
124
|
signing_key:
|
125
125
|
specification_version: 3
|
126
|
-
summary:
|
126
|
+
summary: CLI for Rackspace Cloud File MySQL backups
|
127
127
|
test_files: []
|