From 3bca686707bcded37cd87e663bcb3a98caf61bf9 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Sun, 23 Feb 2025 17:01:35 -0800 Subject: [PATCH] Fix a ZFS error during snapshot cleanup (#1001). --- NEWS | 2 +- borgmatic/hooks/data_source/zfs.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index db012930..cc0d580f 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,5 @@ 1.9.13.dev0 - * + * #1001: Fix a ZFS error during snapshot cleanup. 1.9.12 * #1005: Fix the credential hooks to avoid using Python 3.12+ string features. Now borgmatic will diff --git a/borgmatic/hooks/data_source/zfs.py b/borgmatic/hooks/data_source/zfs.py index 2ca53c18..9cb77587 100644 --- a/borgmatic/hooks/data_source/zfs.py +++ b/borgmatic/hooks/data_source/zfs.py @@ -420,7 +420,7 @@ def remove_data_source_dumps(hook_config, config, borgmatic_runtime_directory, d continue if not dry_run: - shutil.rmtree(snapshots_directory) + shutil.rmtree(snapshot_mount_path, ignore_errors=True) # Destroy snapshots. full_snapshot_names = get_all_snapshots(zfs_command)