Filtering on can_mount == 'on' prevents backing up root ZFS datasets #1269

Closed
opened 2026-02-15 18:35:37 +00:00 by dan.groshev · 4 comments

What I'm trying to do and why

I'm trying to back up a root ZFS dataset after following the official guide.

I marked rpool with org.torsion.borgmatic:backup=auto, which makes the rest of the datasets inherit the marker. However, with --verbose 2 I can see that while borgmatic mounts datasets, it skips rpool/ROOT/debian mounted on root.

After looking through the code, I think I know the reason:

if can_mount == 'on'

The datasets are filtered with can_mount == 'on', rather than with can_mount != 'off'. My root dataset (rpool/ROOT/debian) has canmount == 'noauto', so while it can be mounted, it is still skipped as if it's unmountable.

borgmatic version

1.9.14

borgmatic installation method

Debian package

Borg version

1.4.0

Python version

3.13.5

Operating system and version

Debian GNU/Linux 13 (trixie)

### What I'm trying to do and why I'm trying to back up a root ZFS dataset after following [the official guide](https://openzfs.github.io/openzfs-docs/Getting%20Started/Debian/Debian%20Trixie%20Root%20on%20ZFS.html). I marked `rpool` with `org.torsion.borgmatic:backup=auto`, which makes the rest of the datasets inherit the marker. However, with `--verbose 2` I can see that while borgmatic mounts datasets, it skips `rpool/ROOT/debian` mounted on `root`. After looking through the code, I think I know the reason: https://projects.torsion.org/borgmatic-collective/borgmatic/src/commit/d532fc0f88f0999ed473eda6d58aef424c4f0286/borgmatic/hooks/data_source/zfs.py#L74 The datasets are filtered with `can_mount == 'on'`, rather than with `can_mount != 'off'`. My root dataset (`rpool/ROOT/debian`) has `canmount == 'noauto'`, so while it can be mounted, it is still skipped as if it's unmountable. ### borgmatic version 1.9.14 ### borgmatic installation method Debian package ### Borg version 1.4.0 ### Python version 3.13.5 ### Operating system and version Debian GNU/Linux 13 (trixie)
Owner

Thanks for filing this with all of the details! It's fixed in main now and will be part of the next release.

Thanks for filing this with all of the details! It's fixed in main now and will be part of the next release.
Author

That's was insanely quick haha. Thank you!

That's was _insanely_ quick haha. Thank you!
Owner

Caught me at a good time!

Caught me at a good time!
Owner

Released in borgmatic 2.1.3!

Released in borgmatic 2.1.3!
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
borgmatic-collective/borgmatic#1269
No description provided.