Proposal: Optional ZFS snapshot name prefix

Hi,

I’m currently migrating from LXC and libvirt to Incus 7.0 and I’m having a lot of pleasant surprises along the way. Incus feels very intuitively designed - not needlessly complex, yet very powerful - and so far also very stable. Huge thanks to all the developers for the great work, it’s honestly a joy and a privilege to work with Incus. :slightly_smiling_face:

During the migration I ran into a small, mostly cosmetic detail: I noticed that Incus uses the snapshot- prefix for all its ZFS snapshot names.

I completely understand the need for having your own “namespace” on the storage backend. However, this particular prefix felt quite generic to me, and it took me a moment to realize that this is an Incus convention. Personally, I’d prefer something more obviously Incus‑specific, especially because I have my own scripts interacting with ZFS snapshots and a more distinctive naming pattern would make it easier to spot which snapshots belong to Incus and which are mine.

At the same time, I fully realize that this prefix is likely wired into a lot of places in the code and changing it globally would be complicated and risky – it could introduce regressions in snapshot‑related logic and tools, and would also affect existing installations.

So I was thinking about a compromise that would keep the core simple and stable, but still give interested users some flexibility:

  • Make the snapshot prefix configurable (with the default staying as snapshot-).

  • In code, replace the hardcoded "snapshot-" with a configurable value.

  • Existing installations would be unaffected (default remains snapshot-), while anyone who really wants a different prefix could opt in and then rely on that in their own scripts and tooling.

This would avoid breaking changes while opening a path for more explicit naming on setups that need it.

Does this line of thinking make sense from your perspective?
Would such an option be useful or acceptable for you as developers and for other users?

Have a nice days!

Roman

See the second paragraph in ZFS - zfs - Incus documentation

The snapshot- prefix isn’t there to help you distinguish your snapshots from Incus’ as Incus expects there to be nothing but its own snapshots. It’s there to distinguish with copy- and migration- which Incus also creates at various point in time.

I know that folks have generally had some pretty good luck with external snapshot/replication tooling. Incus doesn’t go out of its way to detect and complain about those, but do keep in mind that it may affect things like:

  • Migration between Incus ZFS pools
  • Migration between servers when both source and target pools are on ZFS
  • Refresh copy between ZFS enabled pools (local or remote)
  • Use of dependent volumes (they expect an identical snapshot set)
  • Optimized backup of the instance (may prevent restoration)
  • Disaster recovery of the system (may prevent restoration)

Thank you for the explanation, I understand.
And thank you also for the excellent documentation - Incus is great! :wink: