From 16ab4f818335e89b2684350d34a23c7c96d5c5dd Mon Sep 17 00:00:00 2001 From: Edwin Eefting Date: Wed, 27 Sep 2023 01:32:29 +0200 Subject: [PATCH] dont automount/read props in testmode --- zfs_autobackup/ZfsDataset.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/zfs_autobackup/ZfsDataset.py b/zfs_autobackup/ZfsDataset.py index bdb52d4..87e7326 100644 --- a/zfs_autobackup/ZfsDataset.py +++ b/zfs_autobackup/ZfsDataset.py @@ -707,6 +707,8 @@ class ZfsDataset: def automount(self): """mount the dataset as if one did a zfs mount -a, but only for this dataset""" + + self.debug("Auto mounting") if self.properties['type']!="filesystem": @@ -775,7 +777,9 @@ class ZfsDataset: #try to automount it, if its the initial transfer if not prev_snapshot: target_snapshot.parent.force_exists=True - target_snapshot.parent.automount() + #in test mode it doesnt actually exist, so dont try to mount it/read properties + if not target_snapshot.zfs_node.readonly: + target_snapshot.parent.automount() def abort_resume(self):