25.10 - Cloud Sync Task Gone - Invalid Character Error

After upgrading to TrueNAS community 25.10-BETA.1 - Goldeye, I noticed that all my cloudsync tasks are gone. When trying to create cloud sync tasks or trying to delete a dataset from my ZFS pool, I get the following error. It appears this version cannot deal with folders that have #'s in the name.

[EZFS_INVALIDNAME]: zfs_open() failed - cannot open 'storage-pool-1/backup/Samples Drive #0': bookmark delimiter '#' is not expected here

The strange thing is, I renamed these folders via the shell and it still throws this error. Here are the middleware logs:

[2025/09/27 13:42:00] (WARNING) middlewared.process_method_call():388 - Exception while calling cloudsync.query(*[]) @cee:{"TNLOG": {"exception": "Traceback (most recent call last):
  File \"/usr/lib/python3/dist-packages/middlewared/api/base/server/ws_handler/rpc.py\", line 354, in process_method_call
    result = await method.call(app, id_, params)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/api/base/server/method.py\", line 57, in call
    result = await self.middleware.call_with_audit(self.name, self.serviceobj, methodobj, params, app,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 954, in call_with_audit
    result = await self._call(method, serviceobj, methodobj, params, app=app,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 771, in _call
    return await methodobj(*prepared_call.args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/api/base/decorator.py\", line 108, in wrapped
    result = await func(*args)
             ^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/service/crud_service.py\", line 161, in query
    result = await self.middleware.call(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1043, in call
    return await self._call(
           ^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 771, in _call
    return await methodobj(*prepared_call.args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/plugins/datastore/read.py\", line 156, in query
    result = await self._queryset_serialize(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/plugins/datastore/read.py\", line 212, in _queryset_serialize
    result = [
             ^
  File \"/usr/lib/python3/dist-packages/middlewared/plugins/datastore/read.py\", line 213, in <listcomp>
    await self._extend(data, extend, extend_context, extend_context_value, select)
  File \"/usr/lib/python3/dist-packages/middlewared/plugins/datastore/read.py\", line 249, in _extend
    data = await self.middleware.call(extend, data, extend_context_value)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1043, in call
    return await self._call(
           ^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 771, in _call
    return await methodobj(*prepared_call.args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/service/sharing_service.py\", line 100, in sharing_task_extend
    data[self.locked_field] = await self.middleware.call(
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1043, in call
    return await self._call(
           ^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 771, in _call
    return await methodobj(*prepared_call.args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/service/sharing_service.py\", line 88, in sharing_task_determine_locked
    return await self.middleware.call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 1043, in call
    return await self._call(
           ^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 782, in _call
    return await self.run_in_executor(prepared_call.executor, methodobj, *prepared_call.args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 665, in run_in_executor
    return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3.11/concurrent/futures/thread.py\", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3/dist-packages/middlewared/plugins/pool_/dataset_encryption_info.py\", line 238, in path_in_locked_datasets
    crypto = tls.lzh.open_resource(name=i).crypto()
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
truenas_pylibzfs.ZFSException: [EZFS_INVALIDNAME]: zfs_open() failed - cannot open 'storage-pool-1/backup/Samples Drive #0': bookmark delimiter '#' is not expected here", "type": "PYTHON_EXCEPTION", "time": "2025-09-27 11:42:00.334337"}}

No idea about your specific issue - however my 2p’s worth does say that your practise of dataset / folder naming is going to cause you more issues than its worth. Spaces in file names is bad enough - but spaces in folder names is (IMO) not good practise and should be avoided

I get you, but these are not datasets. At least, not that I remember. If I use ZFS CLI tools it also doesn’t show them as child datasets. These are ordinary folders in the dataset.