From 7c06e24bd318448b963ee37a292548ec57ecd4c7 Mon Sep 17 00:00:00 2001 From: Edwin Eefting Date: Wed, 25 Sep 2024 15:38:58 +0200 Subject: [PATCH] wip: test --- tests/test_zfsautobackup34.py | 1 + zfs_autobackup/ZfsDataset.py | 2 +- zfs_autobackup/ZfsPool.py | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_zfsautobackup34.py b/tests/test_zfsautobackup34.py index 2c5efeb..80d12ed 100644 --- a/tests/test_zfsautobackup34.py +++ b/tests/test_zfsautobackup34.py @@ -12,6 +12,7 @@ class TestZfsAutobackup34(unittest2.TestCase): subprocess.check_call("zpool destroy test_source1", shell=True) subprocess.check_call("zpool create -d test_source1 /dev/ram0", shell=True) + shelltest("zpool get all test_source1") subprocess.check_call("zfs create -p test_source1/fs1/sub", shell=True) # recreate with no features at all subprocess.check_call("zfs set autobackup:test=true test_source1/fs1", shell=True) diff --git a/zfs_autobackup/ZfsDataset.py b/zfs_autobackup/ZfsDataset.py index 2d603a6..d80679c 100644 --- a/zfs_autobackup/ZfsDataset.py +++ b/zfs_autobackup/ZfsDataset.py @@ -1333,7 +1333,7 @@ class ZfsDataset: prev_target_snapshot.release() #bookmark common snapshot on source, or use holds if bookmarks are not enabled. - if 'bookmarks' in features: + if 'bookmark_v2' in features: source_snapshot.bookmark() else: if holds: diff --git a/zfs_autobackup/ZfsPool.py b/zfs_autobackup/ZfsPool.py index f0cdf2e..709fb7e 100644 --- a/zfs_autobackup/ZfsPool.py +++ b/zfs_autobackup/ZfsPool.py @@ -1,3 +1,6 @@ +from logging import warning + + class ZfsPool(): """a zfs pool"""