zfs_mgmt 0.7.2 → 0.8.0

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.
@@ -0,0 +1,246 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://raw.githubusercontent.com/aranc23/zfs_mgmt/master/schema/config.schema.json",
4
+ "type": "object",
5
+ "title": "Config",
6
+ "description": "Top-level zfsmgr configuration loaded from TOML files",
7
+ "properties": {
8
+ "excludes": {
9
+ "type": "array",
10
+ "items": {
11
+ "type": "string"
12
+ },
13
+ "description": "ZFS properties to exclude on zfs recv (-x)"
14
+ },
15
+ "overrides": {
16
+ "type": "object",
17
+ "description": "ZFS property overrides to set on zfs recv (-o property=value)",
18
+ "additionalProperties": {
19
+ "type": "string"
20
+ }
21
+ },
22
+ "zfs": {
23
+ "type": "object",
24
+ "description": "Per-dataset ZFS configuration keyed by dataset name",
25
+ "additionalProperties": {
26
+ "type": "object",
27
+ "title": "Zfs",
28
+ "description": "Encapsulates zfsmgmt:* user properties for a ZFS dataset",
29
+ "properties": {
30
+ "name": {
31
+ "type": "string",
32
+ "description": "Full name of the ZFS dataset (e.g. tank/data)"
33
+ },
34
+ "type": {
35
+ "type": "string",
36
+ "description": "ZFS dataset type (filesystem or volume)",
37
+ "enum": [
38
+ "filesystem",
39
+ "volume"
40
+ ]
41
+ },
42
+ "manage": {
43
+ "type": "boolean",
44
+ "description": "Whether snapshot retention management is enabled for this dataset",
45
+ "default": false
46
+ },
47
+ "policy": {
48
+ "type": "string",
49
+ "description": "Snapshot retention policy specification (e.g. 10y60m104w365d168h)",
50
+ "pattern": "^(\\d+[hdwmyHDWMY])+$"
51
+ },
52
+ "strategy": {
53
+ "type": "string",
54
+ "description": "Which snapshot to retain within each policy timeframe",
55
+ "enum": [
56
+ "oldest",
57
+ "youngest"
58
+ ],
59
+ "default": "oldest"
60
+ },
61
+ "minage": {
62
+ "type": "string",
63
+ "description": "Minimum age before a snapshot is eligible for destruction (e.g. 7D)",
64
+ "pattern": "^\\d+[smhdwSMHDW]?$"
65
+ },
66
+ "matchsnaps": {
67
+ "type": "string",
68
+ "description": "Regular expression that snapshot names must match to satisfy retention policy"
69
+ },
70
+ "ignoresnaps": {
71
+ "type": "string",
72
+ "description": "Regular expression for snapshot names to ignore during policy evaluation and destruction"
73
+ },
74
+ "prefersnaps": {
75
+ "type": "string",
76
+ "description": "Regular expression for snapshot names preferred when selecting snapshots to retain"
77
+ },
78
+ "snapshot": {
79
+ "description": "Whether snapshots should be created for this dataset (true, false, \"recursive\", or \"local\")",
80
+ "oneOf": [
81
+ {
82
+ "type": "boolean"
83
+ },
84
+ {
85
+ "type": "string",
86
+ "enum": [
87
+ "recursive",
88
+ "local"
89
+ ]
90
+ }
91
+ ],
92
+ "default": false
93
+ },
94
+ "snapshot_recursive": {
95
+ "type": "boolean",
96
+ "description": "Whether snapshots should be created recursively (-r) for this dataset",
97
+ "default": false
98
+ },
99
+ "snap_prefix": {
100
+ "type": "string",
101
+ "description": "Prefix used when naming created snapshots",
102
+ "default": "zfsmgmt"
103
+ },
104
+ "snap_timestamp": {
105
+ "type": "string",
106
+ "description": "strftime format string used when naming created snapshots",
107
+ "default": "%FT%T%z"
108
+ },
109
+ "send": {
110
+ "description": "Whether zfs send is enabled for this dataset (true, false, or \"local\")",
111
+ "oneOf": [
112
+ {
113
+ "type": "boolean"
114
+ },
115
+ {
116
+ "type": "string",
117
+ "enum": [
118
+ "local"
119
+ ]
120
+ }
121
+ ],
122
+ "default": false
123
+ },
124
+ "remote": {
125
+ "type": "string",
126
+ "description": "DEPRECATED: Remote SSH target for zfs recv (specify remote in destination instead, e.g. user@host:pool/dataset)"
127
+ },
128
+ "destination": {
129
+ "description": "Destination ZFS dataset path(s) for zfs send/recv, optionally prefixed with [user@]host: (e.g. backup/tank, user@host:backup/tank, or an array of destinations)",
130
+ "oneOf": [
131
+ {
132
+ "type": "string"
133
+ },
134
+ {
135
+ "type": "array",
136
+ "items": {
137
+ "type": "string"
138
+ }
139
+ }
140
+ ]
141
+ },
142
+ "send_intermediary": {
143
+ "type": "boolean",
144
+ "description": "Pass -I (intermediary snapshots) to zfs send",
145
+ "default": false
146
+ },
147
+ "send_backup": {
148
+ "type": "boolean",
149
+ "description": "Pass -b (backup) to zfs send",
150
+ "default": false
151
+ },
152
+ "send_compressed": {
153
+ "type": "boolean",
154
+ "description": "Pass -c (compressed) to zfs send",
155
+ "default": false
156
+ },
157
+ "send_embed": {
158
+ "type": "boolean",
159
+ "description": "Pass -e (embed) to zfs send",
160
+ "default": false
161
+ },
162
+ "send_holds": {
163
+ "type": "boolean",
164
+ "description": "Pass -h (holds) to zfs send",
165
+ "default": false
166
+ },
167
+ "send_large_block": {
168
+ "type": "boolean",
169
+ "description": "Pass -L (large block) to zfs send",
170
+ "default": false
171
+ },
172
+ "send_props": {
173
+ "type": "boolean",
174
+ "description": "Pass -p (properties) to zfs send",
175
+ "default": false
176
+ },
177
+ "send_raw": {
178
+ "type": "boolean",
179
+ "description": "Pass -w (raw) to zfs send",
180
+ "default": false
181
+ },
182
+ "send_replicate": {
183
+ "type": "boolean",
184
+ "description": "Pass -R (replicate) to zfs send",
185
+ "default": false
186
+ },
187
+ "recv_state": {
188
+ "type": "boolean",
189
+ "description": "Pass -s (save partial receive state) to zfs recv",
190
+ "default": true
191
+ },
192
+ "recv_noop": {
193
+ "type": "boolean",
194
+ "description": "Pass -n (noop) to zfs recv",
195
+ "default": false
196
+ },
197
+ "recv_drop_holds": {
198
+ "type": "boolean",
199
+ "description": "Pass -h (drop holds) to zfs recv",
200
+ "default": false
201
+ },
202
+ "recv_unmount": {
203
+ "type": "boolean",
204
+ "description": "Pass -u (unmount) to zfs recv",
205
+ "default": false
206
+ },
207
+ "recv_discard_first": {
208
+ "type": "boolean",
209
+ "description": "Pass -d (discard first path element) to zfs recv",
210
+ "default": false
211
+ },
212
+ "recv_force": {
213
+ "type": "boolean",
214
+ "description": "Pass -F (force rollback) to zfs recv",
215
+ "default": false
216
+ },
217
+ "excludes": {
218
+ "type": "array",
219
+ "items": {
220
+ "type": "string"
221
+ },
222
+ "description": "ZFS properties to exclude on zfs recv (-x)"
223
+ },
224
+ "overrides": {
225
+ "type": "object",
226
+ "description": "ZFS property overrides to set on zfs recv (-o property=value)",
227
+ "additionalProperties": {
228
+ "type": "string"
229
+ }
230
+ },
231
+ "restic_backup": {
232
+ "type": "boolean",
233
+ "description": "Whether restic backup is enabled for this dataset",
234
+ "default": false
235
+ },
236
+ "restic_repository": {
237
+ "type": "string",
238
+ "description": "Target restic repository for backups"
239
+ }
240
+ },
241
+ "additionalProperties": false
242
+ }
243
+ }
244
+ },
245
+ "additionalProperties": false
246
+ }
data/zfs_mgmt.gemspec CHANGED
@@ -45,5 +45,7 @@ Gem::Specification.new do |spec|
45
45
  spec.add_runtime_dependency "filesize", "~> 0.2"
46
46
  spec.add_runtime_dependency "pstore"
47
47
  spec.add_runtime_dependency "easy_talk"
48
+ spec.add_runtime_dependency "tomlrb"
49
+ spec.add_runtime_dependency "deep_merge"
48
50
 
49
51
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zfs_mgmt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aran Cox
@@ -135,6 +135,34 @@ dependencies:
135
135
  - - ">="
136
136
  - !ruby/object:Gem::Version
137
137
  version: '0'
138
+ - !ruby/object:Gem::Dependency
139
+ name: tomlrb
140
+ requirement: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - ">="
143
+ - !ruby/object:Gem::Version
144
+ version: '0'
145
+ type: :runtime
146
+ prerelease: false
147
+ version_requirements: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - ">="
150
+ - !ruby/object:Gem::Version
151
+ version: '0'
152
+ - !ruby/object:Gem::Dependency
153
+ name: deep_merge
154
+ requirement: !ruby/object:Gem::Requirement
155
+ requirements:
156
+ - - ">="
157
+ - !ruby/object:Gem::Version
158
+ version: '0'
159
+ type: :runtime
160
+ prerelease: false
161
+ version_requirements: !ruby/object:Gem::Requirement
162
+ requirements:
163
+ - - ">="
164
+ - !ruby/object:Gem::Version
165
+ version: '0'
138
166
  email:
139
167
  - arancox@gmail.com
140
168
  executables:
@@ -168,7 +196,9 @@ files:
168
196
  - bin/zfsrecvman
169
197
  - bin/zfssendman
170
198
  - bin/zfssnapman
199
+ - examples/config.toml
171
200
  - lib/zfs_mgmt.rb
201
+ - lib/zfs_mgmt/config.rb
172
202
  - lib/zfs_mgmt/restic.rb
173
203
  - lib/zfs_mgmt/version.rb
174
204
  - lib/zfs_mgmt/zfs.rb
@@ -178,6 +208,7 @@ files:
178
208
  - lib/zfs_mgmt/zfs_mgr/send.rb
179
209
  - lib/zfs_mgmt/zfs_mgr/snapshot.rb
180
210
  - mise.toml
211
+ - schema/config.schema.json
181
212
  - zfs_mgmt.gemspec
182
213
  homepage: https://github.com/aranc23/zfs_mgmt
183
214
  licenses: