cloner 0.5.3 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cloner/mongodb.rb +5 -1
- data/lib/cloner/postgres.rb +5 -1
- data/lib/cloner/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a976f4c658e427e47949ba187908652734a484e6
|
4
|
+
data.tar.gz: 4a05f678a461b6126971dfd2cffcb20787f8e32c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 701d3f0f91cb47bc92ed1bdc04deeccc16a6b100854a704d60a5bc3c24086865c2e1813205f6fd25b9bf7a1ec11654f35ba234614b6cd3fb23d3e8c424128bb4
|
7
|
+
data.tar.gz: cf7cb50911b222812df0fcdb11512d35d55826713c1d5b5953eb3249c242f2c78f6b20bb29cfae66e644f480e9040bf480336b91744f910c635c243c047df7f6
|
data/lib/cloner/mongodb.rb
CHANGED
@@ -50,6 +50,10 @@ module Cloner::MongoDB
|
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
53
|
+
def mongodb_dump_extra
|
54
|
+
""
|
55
|
+
end
|
56
|
+
|
53
57
|
def mongodb_dump_remote
|
54
58
|
puts "backup remote DB via ssh"
|
55
59
|
do_ssh do |ssh|
|
@@ -61,7 +65,7 @@ module Cloner::MongoDB
|
|
61
65
|
else
|
62
66
|
username, password = mongodb_r_conf['username'], mongodb_r_conf['password']
|
63
67
|
end
|
64
|
-
dump = "mongodump -u #{e username} -p #{e password} -d #{e mongodb_r_conf['database']} --authenticationDatabase #{e mongodb_r_conf['database']} -o #{e remote_dump_path}"
|
68
|
+
dump = "mongodump -u #{e username} -p #{e password} -d #{e mongodb_r_conf['database']} --authenticationDatabase #{e mongodb_r_conf['database']} -o #{e remote_dump_path} #{mongodb_dump_extra}"
|
65
69
|
puts dump if verbose?
|
66
70
|
ret = ssh_exec!(ssh, dump)
|
67
71
|
check_ssh_err(ret)
|
data/lib/cloner/postgres.rb
CHANGED
@@ -46,6 +46,10 @@ module Cloner::Postgres
|
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
49
|
+
def pg_dump_extra
|
50
|
+
""
|
51
|
+
end
|
52
|
+
|
49
53
|
def pg_dump_remote
|
50
54
|
puts "backup remote DB via ssh"
|
51
55
|
do_ssh do |ssh|
|
@@ -53,7 +57,7 @@ module Cloner::Postgres
|
|
53
57
|
ret = ssh_exec!(ssh, "mkdir -p #{e remote_dump_path}")
|
54
58
|
check_ssh_err(ret)
|
55
59
|
host = ar_r_conf['host'].present? ? "-h #{e ar_r_conf['host']}" : ""
|
56
|
-
dump = pg_remote_auth + "pg_dump -Fc -U #{e ar_r_conf['username']} #{host} #{e ar_r_conf['database']} > #{e(remote_dump_path + '/tmp.bak')}"
|
60
|
+
dump = pg_remote_auth + "pg_dump -Fc #{pg_dump_extra} -U #{e ar_r_conf['username']} #{host} #{e ar_r_conf['database']} > #{e(remote_dump_path + '/tmp.bak')}"
|
57
61
|
puts dump if verbose?
|
58
62
|
ret = ssh_exec!(ssh, dump)
|
59
63
|
check_ssh_err(ret)
|
data/lib/cloner/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- glebtv
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|