This commit is contained in:
mwiegand 2021-06-26 01:17:47 +02:00
parent 428f5a568b
commit 6519def8d5
2 changed files with 11 additions and 5 deletions

View file

@ -24,6 +24,16 @@ def zfs(metadata):
'mountpoint': f"/mnt/backups/{other_node.metadata.get('id')}",
'backup': False,
}
if other_node.has_bundle('zfs'):
for path in other_node.metadata.get('backup/paths'):
for dataset, config in other_node.metadata.get('zfs/datasets').items():
if path == config.get('mountpoint'):
datasets[f"tank/{other_node.metadata.get('id')}/{dataset}"] = {
'mountpoint': 'none',
'backup': False,
}
return {
'zfs': {

View file

@ -14,12 +14,8 @@ def create(node, path, options):
option_list.append("-o {}={}".format(quote(option), quote(value)))
option_args = " ".join(option_list)
print("zfs create {} {}".format(
option_args,
quote(path),
))
node.run(
"zfs create {} {}".format(
"zfs create -p {} {}".format(
option_args,
quote(path),
),