Rsync Task with Hetzner Storage-Box

Hello,

I am having problems getting a rsync task running with the Hetzner Storage Box.

What I already did:

  1. I created an SSH Keypair in the shell and transferred it to the storage box. The login without password works. I used the private key to create the SSH Keypair under Backup credentials
  2. Afterwards I created a SSH connection with this key pair. It was possible to discover the Remote Host Key
  3. The I created the Rsync task with the following settings:

But as soon as I click on “Save” I get the following error message:

I tried several host paths:

/home/backup

backup/

./backup

But none of them worked.

If I uncheck the “Validate Remote Path’ I get the following error message:

“cannot access local variable ‘known_hosts’ where it is not associated with a value”

Do you have any idea what I am making wrong?

I am using the version “25.10.0.1 - Goldeye”

Best regards

With the first option (Validate Remote Directory) the middlewared.log reports:

[2025/12/02 06:06:51] (INFO) asyncssh.log():92 - Opening SSH connection to u513491.your-storagebox.de, port 23
[2025/12/02 06:06:51] (INFO) asyncssh.log():92 - [conn=7] Connected to SSH server at u513491.your-storagebox.de, port 23
[2025/12/02 06:06:51] (INFO) asyncssh.log():92 - [conn=7] Local address: 192.168.3.4, port 54970
[2025/12/02 06:06:51] (INFO) asyncssh.log():92 - [conn=7] Peer address: 167.235.97.35, port 23
[2025/12/02 06:06:51] (DEBUG) asyncssh.log():92 - [conn=7] Sending version SSH-2.0-AsyncSSH_2.10.1
[2025/12/02 06:06:51] (DEBUG) asyncssh.log():92 - [conn=7] Received version SSH-2.0-OpenSSH_9.6p1 Ubuntu-3ubuntu13.14
[2025/12/02 06:06:51] (DEBUG) asyncssh.log():92 - [conn=7] Requesting key exchange
[2025/12/02 06:06:51] (DEBUG) asyncssh.log():92 - [conn=7] Received key exchange request
[2025/12/02 06:06:51] (DEBUG) asyncssh.log():92 - [conn=7] Beginning key exchange
[2025/12/02 06:06:51] (DEBUG) asyncssh.log():92 - [conn=7] Completed key exchange
[2025/12/02 06:06:51] (INFO) asyncssh.log():92 - [conn=7] Beginning auth for user u513491
[2025/12/02 06:06:51] (DEBUG) asyncssh.log():92 - [conn=7] Trying public key auth with rsa-sha2-256 key
[2025/12/02 06:06:52] (DEBUG) asyncssh.log():92 - [conn=7] Signing request with rsa-sha2-256 key
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7] Auth for user u513491 succeeded
[2025/12/02 06:06:52] (DEBUG) asyncssh.log():92 - [conn=7, chan=0] Set write buffer limits: low-water=16384, high-water=65536
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7, chan=0] Requesting new SSH session
[2025/12/02 06:06:52] (DEBUG) asyncssh.log():92 - [conn=7] Received unknown global request: hostkeys-00@openssh.com
[2025/12/02 06:06:52] (DEBUG) asyncssh.log():92 - [conn=7] Received debug message: /backup/account_chroots/u513491/home/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
[2025/12/02 06:06:52] (DEBUG) asyncssh.log():92 - [conn=7] Received debug message: /backup/account_chroots/u513491/home/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7, chan=0] Command: test -d backup2/
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7, chan=0] Received exit status 8
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7, chan=0] Received channel close
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7, chan=0] Channel closed
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7] Closing connection
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7] Sending disconnect: Disconnected by application (11)
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7] Connection closed

When I uncheck the option I get the following log:

[2025/12/02 06:06:51] (INFO) asyncssh.log():92 - Opening SSH connection to u513491.your-storagebox.de, port 23
[2025/12/02 06:06:51] (INFO) asyncssh.log():92 - [conn=7] Connected to SSH server at u513491.your-storagebox.de, port 23
[2025/12/02 06:06:51] (INFO) asyncssh.log():92 - [conn=7]   Local address: 192.168.3.4, port 54970
[2025/12/02 06:06:51] (INFO) asyncssh.log():92 - [conn=7]   Peer address: 167.235.97.35, port 23
[2025/12/02 06:06:51] (DEBUG) asyncssh.log():92 - [conn=7] Sending version SSH-2.0-AsyncSSH_2.10.1
[2025/12/02 06:06:51] (DEBUG) asyncssh.log():92 - [conn=7] Received version SSH-2.0-OpenSSH_9.6p1 Ubuntu-3ubuntu13.14
[2025/12/02 06:06:51] (DEBUG) asyncssh.log():92 - [conn=7] Requesting key exchange
[2025/12/02 06:06:51] (DEBUG) asyncssh.log():92 - [conn=7] Received key exchange request
[2025/12/02 06:06:51] (DEBUG) asyncssh.log():92 - [conn=7] Beginning key exchange
[2025/12/02 06:06:51] (DEBUG) asyncssh.log():92 - [conn=7] Completed key exchange
[2025/12/02 06:06:51] (INFO) asyncssh.log():92 - [conn=7] Beginning auth for user u513491
[2025/12/02 06:06:51] (DEBUG) asyncssh.log():92 - [conn=7] Trying public key auth with rsa-sha2-256 key
[2025/12/02 06:06:52] (DEBUG) asyncssh.log():92 - [conn=7] Signing request with rsa-sha2-256 key
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7] Auth for user u513491 succeeded
[2025/12/02 06:06:52] (DEBUG) asyncssh.log():92 - [conn=7, chan=0] Set write buffer limits: low-water=16384, high-water=65536
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7, chan=0] Requesting new SSH session
[2025/12/02 06:06:52] (DEBUG) asyncssh.log():92 - [conn=7] Received unknown global request: hostkeys-00@openssh.com
[2025/12/02 06:06:52] (DEBUG) asyncssh.log():92 - [conn=7] Received debug message: /backup/account_chroots/u513491/home/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
[2025/12/02 06:06:52] (DEBUG) asyncssh.log():92 - [conn=7] Received debug message: /backup/account_chroots/u513491/home/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7, chan=0]   Command: test -d backup2/
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7, chan=0] Received exit status 8
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7, chan=0] Received channel close
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7, chan=0] Channel closed
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7] Closing connection
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7] Sending disconnect: Disconnected by application (11)
[2025/12/02 06:06:52] (INFO) asyncssh.log():92 - [conn=7] Connection closed

Ohne validate:
[2025/12/02 06:08:37] (WARNING) middlewared.process_method_call():394 - Exception while calling rsynctask.create(*[{'path': '/mnt/nvme/storage', 'user': 'truenas_admin', 'mode': 'SSH', 'remotehost': None, 'remoteport': None, 'ssh_credentials': 4, 'remotepath': 'backup', 'direction': 'PUSH', 'desc': 'Test', 'schedule': {'minute': '0', 'hour': '0', 'dom': '*', 'month': '*', 'dow': '*'}, 'recursive': True, 'times': True, 'compress': True, 'archive': False, 'delete': False, 'quiet': False, 'preserveperm': False, 'preserveattr': False, 'delayupdates': True, 'extra': [], 'enabled': True, 'validate_rpath': False}]) @cee:{"TNLOG": {"exception": "Traceback (most recent call last):\n  File \"/usr/lib/python3/dist-packages/middlewared/api/base/server/ws_handler/rpc.py\", line 360, in process_method_call\n    result = await method.call(app, id_, params)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3/dist-packages/middlewared/api/base/server/method.py\", line 57, in call\n    result = await self.middleware.call_with_audit(self.name, self.serviceobj, methodobj, params, app,\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 954, in call_with_audit\n    result = await self._call(method, serviceobj, methodobj, params, app=app,\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 771, in _call\n    return await methodobj(*prepared_call.args)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3/dist-packages/middlewared/service/crud_service.py\", line 176, in create\n    return await self.middleware._call(\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 771, in _call\n    return await methodobj(*prepared_call.args)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3/dist-packages/middlewared/service/crud_service.py\", line 214, in nf\n    rv = await func(*args, **kwargs)\n         ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3/dist-packages/middlewared/api/base/decorator.py\", line 108, in wrapped\n    result = await func(*args)\n             ^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3/dist-packages/middlewared/plugins/rsync.py\", line 370, in do_create\n    verrors, data = await self.validate_rsync_task(data, 'rsync_task_create')\n                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3/dist-packages/middlewared/plugins/rsync.py\", line 353, in validate_rsync_task\n    if not known_hosts.match(connect_kwargs['host'], '', None)[0]:\n           ^^^^^^^^^^^\nUnboundLocalError: cannot access local variable 'known_hosts' where it is not associated with a value", "type": "PYTHON_EXCEPTION", "time": "2025-12-02 05:08:37.571845"}}

This means the process checks if in the home directory of the logged in user a subdirectory named backup2 exists. Apparently it does not so the exit status is != 0.

HTH,
Patrick

I have rsync working fine with storage box if you want to compare settings. Heres my config:

Note the folder matches the path folder, in my case “Vault”

Hello @Pross,

I tried the same setting - but I get the same error message as before.

Do you also have version 25.10.2.1?

Best regards,

Hello pmh,

That was one try with a non existing folder.

I get the same error message, wenn I use an existing folder.

For example:

Path after login is /home

I created the folder backup. But none of the following paths is working:

backup, /home/backup, backup/, ./backup

Best regards,

No, im using 24.4 here.

if your folder locally is for example /mnt/nvme/storage then the remote folder would be storage thats what works for me, mine is /mnt/ssd-2tb/Vault and for remote I add Vault.

Hello @Pross,

I tried that also with folder storage. But the error message is the same.

Best regards,

Cant help then, sorry about that.

Hello all,

now I am sure, that this is an issue with version “25.10.0.1 - Goldeye”.

I installed the version “25.04.2.6” on a PROXMOX host. With the same settings I made in the newest version, the rsync job could be configured and also runs without any problem.

The only difference is that I can only use virtual disks for the share as I have no free physical disks in this Proxmox server.

What is the best way to communicate this issue?

Best regards,

Christian

Hi all,

How can I rise this error?

Best regards