zfs_mgmt 0.4.4 → 0.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +22 -19
- data/bin/zfsmgr +1 -1
- data/lib/zfs_mgmt/version.rb +1 -1
- data/lib/zfs_mgmt/zfs_mgr/send.rb +2 -2
- data/lib/zfs_mgmt.rb +10 -4
- data/zfs_mgmt.gemspec +4 -4
- 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: f291d60850dca4bda6a4e388d17cd18700406522f159eb1a3489215d0332fdb3
|
4
|
+
data.tar.gz: 3e8bc46616b93dbc119a5ff6e7e24c5e44d579bd330bf18b5a3658fe368ebc15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1cb48795d7c1d0f9f5499b65149c555aa633e6db1f357c451dba90c5264cc26a81acb62e552b5bea6c241a79bcde488b50eab445f4214be68aa322d91d2d7dab
|
7
|
+
data.tar.gz: 3c5a1b003771b5481ac5419facf28ecbd25c92cf1095fa173a8f0ff4e2b326f2ffdd31bcc9ad4fa0978dd6c5ca583215228f43ec9da69540ce5c6ea28a73c467
|
data/Gemfile.lock
CHANGED
@@ -1,36 +1,39 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
zfs_mgmt (0.4.
|
4
|
+
zfs_mgmt (0.4.7)
|
5
|
+
filesize (~> 0.2)
|
6
|
+
text-table (~> 1.2)
|
7
|
+
thor (~> 1.0)
|
5
8
|
|
6
9
|
GEM
|
7
10
|
remote: https://rubygems.org/
|
8
11
|
specs:
|
9
|
-
diff-lcs (1.
|
12
|
+
diff-lcs (1.5.0)
|
10
13
|
filesize (0.2.0)
|
11
|
-
json (2.
|
12
|
-
rake (13.0.
|
13
|
-
rspec (3.
|
14
|
-
rspec-core (~> 3.
|
15
|
-
rspec-expectations (~> 3.
|
16
|
-
rspec-mocks (~> 3.
|
17
|
-
rspec-core (3.
|
18
|
-
rspec-support (~> 3.
|
19
|
-
rspec-expectations (3.
|
14
|
+
json (2.6.2)
|
15
|
+
rake (13.0.6)
|
16
|
+
rspec (3.11.0)
|
17
|
+
rspec-core (~> 3.11.0)
|
18
|
+
rspec-expectations (~> 3.11.0)
|
19
|
+
rspec-mocks (~> 3.11.0)
|
20
|
+
rspec-core (3.11.0)
|
21
|
+
rspec-support (~> 3.11.0)
|
22
|
+
rspec-expectations (3.11.0)
|
20
23
|
diff-lcs (>= 1.2.0, < 2.0)
|
21
|
-
rspec-support (~> 3.
|
22
|
-
rspec-mocks (3.
|
24
|
+
rspec-support (~> 3.11.0)
|
25
|
+
rspec-mocks (3.11.1)
|
23
26
|
diff-lcs (>= 1.2.0, < 2.0)
|
24
|
-
rspec-support (~> 3.
|
25
|
-
rspec-support (3.
|
27
|
+
rspec-support (~> 3.11.0)
|
28
|
+
rspec-support (3.11.0)
|
26
29
|
text-table (1.2.4)
|
27
|
-
thor (1.
|
30
|
+
thor (1.2.1)
|
28
31
|
|
29
32
|
PLATFORMS
|
30
|
-
|
33
|
+
x86_64-linux
|
31
34
|
|
32
35
|
DEPENDENCIES
|
33
|
-
bundler (
|
36
|
+
bundler (>= 2.2.33)
|
34
37
|
filesize
|
35
38
|
json
|
36
39
|
rake (>= 12.3.3)
|
@@ -40,4 +43,4 @@ DEPENDENCIES
|
|
40
43
|
zfs_mgmt!
|
41
44
|
|
42
45
|
BUNDLED WITH
|
43
|
-
|
46
|
+
2.3.21
|
data/bin/zfsmgr
CHANGED
@@ -17,7 +17,7 @@ class ZfsMgr < Thor
|
|
17
17
|
:enum => ['debug','error','fatal','info','warn'],
|
18
18
|
:desc => 'set logging level to specified severity'
|
19
19
|
desc "zfsget [ZFS]", "execute zfs get for the given properties and types and parse the output into a nested hash"
|
20
|
-
method_option :properties, :type => :
|
20
|
+
method_option :properties, :type => :string, :default => ['name'], :desc => "List of properties passed to zfs get", repeatable: true
|
21
21
|
method_option :types, :type => :array, :default => ['filesystem','volume'], enum: ['filesystem','volume','snapshot'], :desc => "list of types"
|
22
22
|
def zfsget(zfs)
|
23
23
|
ZfsMgmt.set_log_level(options[:loglevel])
|
data/lib/zfs_mgmt/version.rb
CHANGED
@@ -25,8 +25,8 @@ class ZfsMgmt::ZfsMgr::Send < Thor
|
|
25
25
|
|
26
26
|
method_option :noop, :aliases => :'-n', :desc => "pass -n (noop) option to zfs send", :type => :boolean
|
27
27
|
method_option :unmount, :aliases => :'-u', :desc => "pass -u (unmount) option to zfs receive", :type => :boolean
|
28
|
-
method_option :exclude, :aliases => :'-x', :desc => "passed to -x option of receive side", :type => :
|
29
|
-
method_option :option, :aliases => :'-o', :desc => "passed to -o option of receive side", :type => :
|
28
|
+
method_option :exclude, :aliases => :'-x', :desc => "passed to -x option of receive side", :type => :string, repeatable: true
|
29
|
+
method_option :option, :aliases => :'-o', :desc => "passed to -o option of receive side", :type => :string, repeatable: true
|
30
30
|
method_option :drop_holds, :desc => "pass the -h option to zfs recv, indicating holds should be ignored", :type => :boolean
|
31
31
|
|
32
32
|
method_option :mbuffer, :desc => "insert mbuffer between send and recv", :default => true, :type => :boolean
|
data/lib/zfs_mgmt.rb
CHANGED
@@ -311,7 +311,7 @@ module ZfsMgmt
|
|
311
311
|
$logger.debug("delete: #{snap_name} #{local_epoch_to_datetime(snaps[snap_name]['creation']).strftime('%F %T')}")
|
312
312
|
end
|
313
313
|
|
314
|
-
com_base = [
|
314
|
+
com_base = [ZfsMgmt.global_options[:zfs_binary], 'destroy']
|
315
315
|
com_base.push('-d') if deleteme.length > 0 # why?
|
316
316
|
com_base.push('-n') if noop
|
317
317
|
com_base.push('-v') if verbose
|
@@ -423,7 +423,7 @@ module ZfsMgmt
|
|
423
423
|
source = sorted[0]
|
424
424
|
if options[:initial_snapshot] == 'newest' or
|
425
425
|
key_comp?(options, 'replicate') or
|
426
|
-
key_comp?(props, 'zfsmgmt:
|
426
|
+
key_comp?(props, 'zfsmgmt:send_replicate')
|
427
427
|
source = sorted[-1]
|
428
428
|
end
|
429
429
|
com += zfs_send_com(options,
|
@@ -603,11 +603,17 @@ module ZfsMgmt
|
|
603
603
|
lcom.push('2>&1')
|
604
604
|
lcom = precom + lcom
|
605
605
|
$logger.debug(lcom.join(' '))
|
606
|
+
total = 0
|
606
607
|
%x[#{lcom.join(' ')}].each_line do |l|
|
607
|
-
if m =
|
608
|
-
return m[
|
608
|
+
if m = /^size\s+(\d+)$/.match(l)
|
609
|
+
return m[1].to_i
|
610
|
+
elsif m = /^incremental\s+.+?\s+.+?\s+(\d+)$/.match(l)
|
611
|
+
total = total + m[1].to_i
|
609
612
|
end
|
610
613
|
end
|
614
|
+
if total > 0
|
615
|
+
return total
|
616
|
+
end
|
611
617
|
$logger.error("no estimate available")
|
612
618
|
return nil
|
613
619
|
end
|
data/zfs_mgmt.gemspec
CHANGED
@@ -36,11 +36,11 @@ Gem::Specification.new do |spec|
|
|
36
36
|
spec.executables = ['readsnaps','zfssendman','zfssnapman','zfsrecvman','zfs-list-snapshots','zfsmgr']
|
37
37
|
spec.require_paths = ["lib"]
|
38
38
|
|
39
|
-
spec.add_development_dependency "bundler", "
|
39
|
+
spec.add_development_dependency "bundler", ">= 2.2.33"
|
40
40
|
spec.add_development_dependency "rake", ">= 12.3.3"
|
41
41
|
spec.add_development_dependency "rspec", "~> 3.0"
|
42
|
-
spec.
|
43
|
-
spec.
|
44
|
-
spec.
|
42
|
+
spec.add_runtime_dependency "thor", "~> 1.0"
|
43
|
+
spec.add_runtime_dependency "text-table", "~> 1.2"
|
44
|
+
spec.add_runtime_dependency "filesize", "~> 0.2"
|
45
45
|
|
46
46
|
end
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zfs_mgmt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aran Cox
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.2.33
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 2.2.33
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -59,7 +59,7 @@ dependencies:
|
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '1.0'
|
62
|
-
type: :
|
62
|
+
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
@@ -73,7 +73,7 @@ dependencies:
|
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '1.2'
|
76
|
-
type: :
|
76
|
+
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
@@ -87,14 +87,14 @@ dependencies:
|
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0.2'
|
90
|
-
type: :
|
90
|
+
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0.2'
|
97
|
-
description:
|
97
|
+
description:
|
98
98
|
email:
|
99
99
|
- arancox@gmail.com
|
100
100
|
executables:
|
@@ -140,7 +140,7 @@ metadata:
|
|
140
140
|
homepage_uri: https://github.com/aranc23/zfs_mgmt
|
141
141
|
source_code_uri: https://github.com/aranc23/zfs_mgmt
|
142
142
|
changelog_uri: https://github.com/aranc23/zfs_mgmt/commits/
|
143
|
-
post_install_message:
|
143
|
+
post_install_message:
|
144
144
|
rdoc_options: []
|
145
145
|
require_paths:
|
146
146
|
- lib
|
@@ -155,8 +155,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
155
|
- !ruby/object:Gem::Version
|
156
156
|
version: '0'
|
157
157
|
requirements: []
|
158
|
-
rubygems_version: 3.
|
159
|
-
signing_key:
|
158
|
+
rubygems_version: 3.3.7
|
159
|
+
signing_key:
|
160
160
|
specification_version: 4
|
161
161
|
summary: Misc. helpers regarding snapshots and send/recv.
|
162
162
|
test_files: []
|