backupper 0.5.0 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +22 -8
- data/backupper.gemspec +2 -2
- data/bin/backupper +5 -1
- data/lib/backupper/backupper.rb +2 -1
- data/lib/backupper/dump_command.rb +2 -4
- data/lib/backupper/version.rb +1 -1
- metadata +14 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 427e5d2913d10307c2a02b49cf8948aec658561267d602553b1c8a2f02af113a
|
4
|
+
data.tar.gz: cf4a1a6fe666551223bea18ed1a53d8a6aa170d23e1a5bcc52f92c6282f5fea6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72cca9939837dd3d45ac6853ba2985349ac53659a8e34195b61b9133b08ffb35846346e3b656e933b587badbd27ff585124a9071c805fc7e80ca1f64ea19262e
|
7
|
+
data.tar.gz: 8a743ab45a61dfbf13c6f31511d4e8339a2f905c25c5602049073153ea09c0d1795daea96148d81c83fdd0ae72bf4296b26a32a0844c5c6e0a882f4c1fa67025
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
backupper (0.5.
|
4
|
+
backupper (0.5.1)
|
5
5
|
mail (~> 2.7)
|
6
6
|
sshkit (~> 1.15)
|
7
7
|
|
@@ -9,16 +9,30 @@ GEM
|
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
11
|
byebug (11.0.1)
|
12
|
-
|
12
|
+
date (3.3.3)
|
13
|
+
mail (2.8.0)
|
13
14
|
mini_mime (>= 0.1.1)
|
15
|
+
net-imap
|
16
|
+
net-pop
|
17
|
+
net-smtp
|
14
18
|
mini_mime (1.1.2)
|
15
|
-
net-
|
16
|
-
|
17
|
-
|
19
|
+
net-imap (0.3.4)
|
20
|
+
date
|
21
|
+
net-protocol
|
22
|
+
net-pop (0.1.2)
|
23
|
+
net-protocol
|
24
|
+
net-protocol (0.2.1)
|
25
|
+
timeout
|
26
|
+
net-scp (4.0.0)
|
27
|
+
net-ssh (>= 2.6.5, < 8.0.0)
|
28
|
+
net-smtp (0.3.3)
|
29
|
+
net-protocol
|
30
|
+
net-ssh (7.0.1)
|
18
31
|
rake (10.5.0)
|
19
|
-
sshkit (1.21.
|
32
|
+
sshkit (1.21.3)
|
20
33
|
net-scp (>= 1.1.2)
|
21
34
|
net-ssh (>= 2.8.0)
|
35
|
+
timeout (0.3.1)
|
22
36
|
|
23
37
|
PLATFORMS
|
24
38
|
ruby
|
@@ -26,8 +40,8 @@ PLATFORMS
|
|
26
40
|
|
27
41
|
DEPENDENCIES
|
28
42
|
backupper!
|
29
|
-
bundler
|
30
|
-
byebug
|
43
|
+
bundler (~> 2)
|
44
|
+
byebug (~> 11)
|
31
45
|
rake (~> 10.0)
|
32
46
|
|
33
47
|
BUNDLED WITH
|
data/backupper.gemspec
CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.add_runtime_dependency 'mail', '~> 2.7'
|
32
32
|
spec.add_runtime_dependency 'sshkit', '~> 1.15'
|
33
33
|
|
34
|
-
spec.add_development_dependency 'bundler'
|
35
|
-
spec.add_development_dependency 'byebug'
|
34
|
+
spec.add_development_dependency 'bundler', '~> 2'
|
35
|
+
spec.add_development_dependency 'byebug', '~> 11'
|
36
36
|
spec.add_development_dependency 'rake', '~> 10.0'
|
37
37
|
end
|
data/bin/backupper
CHANGED
@@ -19,7 +19,6 @@ end
|
|
19
19
|
|
20
20
|
begin
|
21
21
|
parser.parse!
|
22
|
-
raise OptionParser::InvalidOption if ARGV.size != 1
|
23
22
|
rescue OptionParser::InvalidOption
|
24
23
|
puts parser.help
|
25
24
|
exit 1
|
@@ -30,5 +29,10 @@ if options[:version]
|
|
30
29
|
exit 0
|
31
30
|
end
|
32
31
|
|
32
|
+
if ARGV.size != 1
|
33
|
+
puts parser.help
|
34
|
+
exit 1
|
35
|
+
end
|
36
|
+
|
33
37
|
b = Backupper.new(ARGV.first)
|
34
38
|
b.backup!(options[:only])
|
data/lib/backupper/backupper.rb
CHANGED
@@ -1,18 +1,16 @@
|
|
1
1
|
module DumpCommand
|
2
2
|
def self.mysql(database:, username: 'root', password: nil, dump_options: nil, outfile:)
|
3
3
|
params = []
|
4
|
-
params << "--databases '#{database}'"
|
5
4
|
params << "-u'#{username}'"
|
6
5
|
params << "-p'#{password}'" if password
|
7
6
|
params << dump_options if dump_options
|
8
|
-
return "mysqldump #{params.join(' ')} | bzip2 > '#{outfile}'"
|
7
|
+
return "mysqldump '#{database}' #{params.join(' ')} | bzip2 > '#{outfile}'"
|
9
8
|
end
|
10
9
|
|
11
10
|
def self.postgresql(database:, username: 'root', password: nil, dump_options: nil, outfile:)
|
12
11
|
params = []
|
13
12
|
params << "-U '#{username}'"
|
14
|
-
params << "'#{database}'"
|
15
13
|
params << dump_options if dump_options
|
16
|
-
return "PGPASSWORD='#{password}' pg_dump #{params.join(' ')} | bzip2 > '#{outfile}'"
|
14
|
+
return "PGPASSWORD='#{password}' pg_dump '#{database}' #{params.join(' ')} | bzip2 > '#{outfile}'"
|
17
15
|
end
|
18
16
|
end
|
data/lib/backupper/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: backupper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pioz
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mail
|
@@ -42,30 +42,30 @@ dependencies:
|
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '2'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '2'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: byebug
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '11'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '11'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -107,7 +107,7 @@ licenses:
|
|
107
107
|
- MIT
|
108
108
|
metadata:
|
109
109
|
allowed_push_host: https://rubygems.org
|
110
|
-
post_install_message:
|
110
|
+
post_install_message:
|
111
111
|
rdoc_options: []
|
112
112
|
require_paths:
|
113
113
|
- lib
|
@@ -122,8 +122,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
122
122
|
- !ruby/object:Gem::Version
|
123
123
|
version: '0'
|
124
124
|
requirements: []
|
125
|
-
rubygems_version: 3.
|
126
|
-
signing_key:
|
125
|
+
rubygems_version: 3.5.3
|
126
|
+
signing_key:
|
127
127
|
specification_version: 4
|
128
128
|
summary: Tool to backup databases
|
129
129
|
test_files: []
|