rbarman 0.0.15 → 0.0.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rbarman/cli_command.rb +6 -6
- data/lib/rbarman/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 196cb69184c1663ee88b899670de67ac012a65ce
|
4
|
+
data.tar.gz: c3f37be10bb928840fc482fc6f6eb4036bf4a0c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b97aa40bea6b72d1b96a8187bcd2f8df00474b58e3a14a8cbc8bc442e5aff0014081c063a8e075cf36db77b885b99d0f3419665837ee9235b1e9e231be00a5b1
|
7
|
+
data.tar.gz: 70bf7237a2a3c53d3644957a02cb8792a68a7f6b8734b5586982c1d03d19d37e66591e3cdf8c774fb2627e09eebacaf8eff5d7d11aba2fd26958713e066c1218
|
data/lib/rbarman/cli_command.rb
CHANGED
@@ -12,7 +12,7 @@ module RBarman
|
|
12
12
|
# Path to the barman binary
|
13
13
|
# @param [String] path path to the binary
|
14
14
|
# @raise [ArgumentError] if path doesn't exist or path doesn't end with 'barman'
|
15
|
-
attr_reader :binary
|
15
|
+
attr_reader :binary
|
16
16
|
|
17
17
|
# @overload barman_home
|
18
18
|
# @return [String] base path where barman stores its backups
|
@@ -118,7 +118,7 @@ module RBarman
|
|
118
118
|
lines = run_barman_command("list-files --target wal #{server} #{backup_id}")
|
119
119
|
wal_files = parse_wal_files_list(lines)
|
120
120
|
xlog_db = read_xlog_db(server)
|
121
|
-
wal_files.each do |w|
|
121
|
+
wal_files.each do |w|
|
122
122
|
wal = "#{w.timeline}#{w.xlog}#{w.segment}"
|
123
123
|
entry = xlog_db[wal]
|
124
124
|
w.size = entry[:size]
|
@@ -179,7 +179,7 @@ module RBarman
|
|
179
179
|
key, value = l.gsub("\t","").split(": ")
|
180
180
|
case key.chomp
|
181
181
|
when "ssh"
|
182
|
-
server.ssh_check_ok = value
|
182
|
+
server.ssh_check_ok = value =~ /OK/ ? true : false
|
183
183
|
when "PostgreSQL"
|
184
184
|
server.pg_conn_ok = value == "OK" ? true : false
|
185
185
|
end
|
@@ -210,7 +210,7 @@ module RBarman
|
|
210
210
|
|
211
211
|
status_match = l.match(/.+(FAILED|STARTED)/)
|
212
212
|
status_match.nil? ? b.status = :done : b.status = status_match[1].downcase.to_sym
|
213
|
-
|
213
|
+
|
214
214
|
if b.status == :done
|
215
215
|
sizematch = l.match(/.+Size:\s(\S+)\s(\S+)\s-.+Size:\s(\S+)\s(\S+)/)
|
216
216
|
b.size = CliCommand.size_in_bytes(sizematch[1].to_f, sizematch[2])
|
@@ -275,7 +275,7 @@ module RBarman
|
|
275
275
|
def self.size_in_bytes(size, unit)
|
276
276
|
raise(ArgumentError, "unit not one of B|KiB|MiB|GiB|TiB") if !unit.match(/(B|KiB|MiB|GiB|TiB)/)
|
277
277
|
size_b = 0
|
278
|
-
case unit
|
278
|
+
case unit
|
279
279
|
when "B"
|
280
280
|
size_b = size
|
281
281
|
when "KiB"
|
@@ -285,7 +285,7 @@ module RBarman
|
|
285
285
|
when "GiB"
|
286
286
|
size_b = size * 1024 ** 3
|
287
287
|
when "TiB"
|
288
|
-
size_b = size * 1024 ** 4
|
288
|
+
size_b = size * 1024 ** 4
|
289
289
|
end
|
290
290
|
return size_b.to_i
|
291
291
|
end
|
data/lib/rbarman/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbarman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Holger Amann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
91
|
version: '0'
|
92
92
|
requirements: []
|
93
93
|
rubyforge_project:
|
94
|
-
rubygems_version: 2.
|
94
|
+
rubygems_version: 2.5.1
|
95
95
|
signing_key:
|
96
96
|
specification_version: 4
|
97
97
|
summary: Wrapper for 2ndQuadrant's PostgreSQL backup tool 'barman'
|