litestream 0.8.0-arm64-linux → 0.9.0-arm64-linux
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/litestream/version.rb +1 -1
- data/lib/tasks/litestream_tasks.rake +48 -18
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc472b950abdf855acfe66f39368cfa97827355c2d472ecbb77b4a8c14af2fee
|
4
|
+
data.tar.gz: 8c825cd5331255b16c0bf4e53608f7df56059589b29fc560014fb03f81556787
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89ba1fe375c44de1664e5883b94215d34c0902ce2eab6b3b14fae84309b4eca7b2ba21762b5cae5f88f6f11220dfaf9a27f611fb0f72a98673f6d79b1837d7a6
|
7
|
+
data.tar.gz: 5194734875bf2270823f03284b6ec704a0e8149d2606e6d1cfe6b1e9df254e64d86e5f491bac750f840b7fe4cb88dd06347123577aada2af719a9b809710c892
|
data/lib/litestream/version.rb
CHANGED
@@ -93,23 +93,53 @@ namespace :litestream do
|
|
93
93
|
options.symbolize_keys!
|
94
94
|
|
95
95
|
result = Litestream::Commands.verify(database, async: true, **options)
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
96
|
+
original_tables = result["original"]["tables"]
|
97
|
+
restored_tables = result["restored"]["tables"]
|
98
|
+
original_indexes = result["original"]["indexes"]
|
99
|
+
restored_indexes = result["restored"]["indexes"]
|
100
|
+
original_rows = result["original"]["rows"]
|
101
|
+
restored_rows = result["restored"]["rows"]
|
102
|
+
|
103
|
+
same_number_of_tables = original_tables == restored_tables
|
104
|
+
same_number_of_indexes = original_indexes == restored_indexes
|
105
|
+
same_number_of_rows = original_rows == restored_rows
|
106
|
+
|
107
|
+
if same_number_of_tables && same_number_of_indexes && same_number_of_rows
|
108
|
+
puts "Backup for `#{database}` verified as consistent!\n" + [
|
109
|
+
" tables #{original_tables}",
|
110
|
+
" indexes #{original_indexes}",
|
111
|
+
" rows #{original_rows}"
|
112
|
+
].compact.join("\n")
|
113
|
+
else
|
114
|
+
abort "Verification failed for #{database}:\n" + [
|
115
|
+
(unless same_number_of_tables
|
116
|
+
if original_tables > restored_tables
|
117
|
+
diff = original_tables - restored_tables
|
118
|
+
" Backup is missing #{diff} table#{"s" if diff > 1}"
|
119
|
+
else
|
120
|
+
diff = restored_tables - original_tables
|
121
|
+
" Backup has extra #{diff} table#{"s" if diff > 1}"
|
122
|
+
end
|
123
|
+
end),
|
124
|
+
(unless same_number_of_indexes
|
125
|
+
if original_indexes > restored_indexes
|
126
|
+
diff = original_indexes - restored_indexes
|
127
|
+
" Backup is missing #{diff} index#{"es" if diff > 1}"
|
128
|
+
else
|
129
|
+
diff = restored_indexes - original_indexes
|
130
|
+
" Backup has extra #{diff} index#{"es" if diff > 1}"
|
131
|
+
end
|
132
|
+
end),
|
133
|
+
(unless same_number_of_rows
|
134
|
+
if original_rows > restored_rows
|
135
|
+
diff = original_rows - restored_rows
|
136
|
+
" Backup is missing #{diff} row#{"s" if diff > 1}"
|
137
|
+
else
|
138
|
+
diff = restored_rows - original_rows
|
139
|
+
" Backup has extra #{diff} row#{"s" if diff > 1}"
|
140
|
+
end
|
141
|
+
end)
|
142
|
+
].compact.join("\n")
|
143
|
+
end
|
114
144
|
end
|
115
145
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: litestream
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: arm64-linux
|
6
6
|
authors:
|
7
7
|
- Stephen Margheim
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-05-
|
11
|
+
date: 2024-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logfmt
|