backupper 0.1.1 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/backupper.gemspec +2 -0
- data/bin/backupper +0 -2
- data/lib/backupper/backupper.rb +3 -4
- data/lib/backupper/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87540071116c9775a805a84eaafb5d06ecf335d8
|
4
|
+
data.tar.gz: a76112f17dfcfcd15f971bc95e2fbcb55cc20bc2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b8be9892a220bd6cb80b51bd79906393a7abaddf52480cadfd39d39b61782ae72aa0f2c274e2e11e82921ee86c24d970b94a79a5225f90e8dc50a4137674ec0
|
7
|
+
data.tar.gz: 5b4de132ed2370cdaec0e8cd4a2863a56835b3eb0cd9b9bebb8e05b9c9833e266283287054e23a4d89c5f54caae8bc3def3aca9b452f15fcefefcfc3849f0b77
|
data/backupper.gemspec
CHANGED
@@ -31,6 +31,8 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.require_paths = ["lib"]
|
32
32
|
|
33
33
|
spec.add_runtime_dependency "sshkit", "~> 1.15"
|
34
|
+
spec.add_runtime_dependency "mail", "~> 2.7"
|
35
|
+
|
34
36
|
spec.add_development_dependency "bundler", "~> 1.16"
|
35
37
|
spec.add_development_dependency "rake", "~> 10.0"
|
36
38
|
end
|
data/bin/backupper
CHANGED
data/lib/backupper/backupper.rb
CHANGED
@@ -94,15 +94,14 @@ class Backupper
|
|
94
94
|
if self.respond_to?("#{adapter}_dump_command")
|
95
95
|
t = Time.now
|
96
96
|
path = nil
|
97
|
-
dump_name = nil
|
98
97
|
filename = "#{key}__#{database}.sql.bz2"
|
99
98
|
tempfile = File.join('/tmp', filename)
|
100
99
|
dumpname = "#{Time.now.strftime('%Y-%M-%d_%H-%M-%S')}__#{filename}"
|
101
100
|
path = File.join(outdir, dumpname)
|
102
101
|
backupper = self
|
103
|
-
on(host) do |
|
104
|
-
|
105
|
-
execute backupper.send("#{adapter}_dump_command", database: database, username: db_username, password: db_password, outfile: tempfile)
|
102
|
+
on(host) do |client|
|
103
|
+
client.password = password
|
104
|
+
execute 'set -o pipefail; ' + backupper.send("#{adapter}_dump_command", database: database, username: db_username, password: db_password, outfile: tempfile)
|
106
105
|
download! tempfile, path
|
107
106
|
execute :rm, tempfile
|
108
107
|
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.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pioz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sshkit
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.15'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: mail
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '2.7'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '2.7'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bundler
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|