ZFS snapshots for virtual sub clients

There is still no way to use ZFS COW file backups with virtual sub clients, because ‘[’ and ‘]’ are not allowed in ZFS component names

I might take a crack at fixing it, by encoding the name to only use allowed characters. Something like

client.example.com[virtual_name] ==> client.example.com::virtual_name::

It’s only needed for datasets, ZFS has no problems with [ ] in folder names, and I don’t think it’s likely this scheme will clash with normal client names but I wanted to see if anybody sees a problem with it before I start working on it?

See no problem. ZFS also has the problem that dataset paths have a low length limit. So perhaps solve that problem simultaneously. E.g. if the client name contains [] or is too long use the client id instead for the client ZFS dataset component.

Edit: So the 88 character dataset path limit was in FreeBSD and might be already fixed.

FreeBSD 12.2 has a limit of total dataset path length of 255 chars. So if I have a dataset called data, and under that another dataset called urbackup we have data/urbackup and that leaves 242 chars. The mountpoint attribute seems to have the same limit.

Using client id for dataset name sounds smart, but it sucks that it makes reading the output of zfs list more difficult. I’ll see if I can get some traction on this

Yeah, 255 should be enough to not cause problems in most cases…