bundles/zfs: remove support for snapshot_only and snapshot_never (unused)
This commit is contained in:
parent
b20f369ea8
commit
2fbbaa1586
3 changed files with 2 additions and 77 deletions
|
@ -31,14 +31,8 @@ label = argv[1]
|
|||
with open('/etc/zfs-snapshot-config.json', 'r') as fp:
|
||||
metadata = loads(fp.read())
|
||||
|
||||
if 'snapshot_only' in metadata:
|
||||
datasets = set(metadata['snapshot_only'])
|
||||
else:
|
||||
output = check_output(['zfs', 'list', '-H', '-o', 'name']).decode('UTF-8')
|
||||
datasets = set(output.splitlines())
|
||||
|
||||
for pattern in metadata.get('snapshot_never', set()):
|
||||
datasets = set(filter(lambda x: not re.search(pattern, x), datasets))
|
||||
output = check_output(['zfs', 'list', '-H', '-o', 'name']).decode('UTF-8')
|
||||
datasets = set(output.splitlines())
|
||||
|
||||
default_retain = metadata['retain_defaults'][label]
|
||||
now = datetime.now().strftime('%F-%H%M')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue