Replication TrueNAS Core to Scale

Hello,

I would like to clone my pool (or some datasets) from TrueNAS Core (TrueNAS-12.0-U8) to TrueNAS Scale (Dragonfish-24.04.2.5) using a “Replication Task”.
Unfortunately, I haven’t been able to establish an SSH connection from TrueNAS Core to Scale for hours.
Is this even possible?
Or can I only copy via SMB, if I don’t want to update the old core system to Scale?

I may have to add more.
I only want to use SSH with a password without private keys.

What error do you have exactly?

Have you tried to connect from Scale to Core, and pull data instead of push from Core?

1 Like
Error: Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/zettarepl.py", line 654, in _handle_ssh_exceptions
    yield
  File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/zettarepl.py", line 409, in list_datasets
    datasets = await self.middleware.run_in_thread(list_datasets, shell)
  File "/usr/local/lib/python3.9/site-packages/middlewared/utils/run_in_thread.py", line 10, in run_in_thread
    return await self.loop.run_in_executor(self.run_in_thread_executor, functools.partial(method, *args, **kwargs))
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/site-packages/zettarepl/dataset/list.py", line 13, in list_datasets
    return [dataset["name"] for dataset in list_datasets_with_properties(shell, dataset, recursive)]
  File "/usr/local/lib/python3.9/site-packages/zettarepl/dataset/list.py", line 30, in list_datasets_with_properties
    output = shell.exec(args)
  File "/usr/local/lib/python3.9/site-packages/zettarepl/transport/interface.py", line 89, in exec
    return self.exec_async(args, encoding, stdout).wait(timeout)
  File "/usr/local/lib/python3.9/site-packages/zettarepl/transport/interface.py", line 93, in exec_async
    async_exec.run()
  File "/usr/local/lib/python3.9/site-packages/zettarepl/transport/base_ssh.py", line 27, in run
    client = self.shell.get_client()
  File "/usr/local/lib/python3.9/site-packages/zettarepl/transport/base_ssh.py", line 123, in get_client
    client.connect(
  File "/usr/local/lib/python3.9/site-packages/paramiko/client.py", line 435, in connect
    self._auth(
  File "/usr/local/lib/python3.9/site-packages/paramiko/client.py", line 764, in _auth
    raise saved_exception
  File "/usr/local/lib/python3.9/site-packages/paramiko/client.py", line 664, in _auth
    self._transport.auth_publickey(username, pkey)
  File "/usr/local/lib/python3.9/site-packages/paramiko/transport.py", line 1580, in auth_publickey
    return self.auth_handler.wait_for_response(my_event)
  File "/usr/local/lib/python3.9/site-packages/paramiko/auth_handler.py", line 250, in wait_for_response
    raise e
paramiko.ssh_exception.AuthenticationException: Authentication failed.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 138, in call_method
    result = await self.middleware._call(message['method'], serviceobj, methodobj, params, app=self,
  File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1213, in _call
    return await methodobj(*prepared_call.args)
  File "/usr/local/lib/python3.9/site-packages/middlewared/schema.py", line 975, in nf
    return await f(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/replication.py", line 642, in list_datasets
    return await self.middleware.call("zettarepl.list_datasets", transport, ssh_credentials)
  File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1256, in call
    return await self._call(
  File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1213, in _call
    return await methodobj(*prepared_call.args)
  File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/zettarepl.py", line 409, in list_datasets
    datasets = await self.middleware.run_in_thread(list_datasets, shell)
  File "/usr/local/lib/python3.9/contextlib.py", line 199, in __aexit__
    await self.gen.athrow(typ, value, traceback)
  File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/zettarepl.py", line 657, in _handle_ssh_exceptions
    raise CallError(repr(e).replace("[Errno None] ", ""), errno=errno.EACCES)
middlewared.service_exception.CallError: [EACCES] AuthenticationException('Authentication failed.')

This is the error on the core system.

The other way (Pull from Core) I don’t try, yet.

The Scale user you are using, have a keypar or are you generating one? Seems there Is a problem on the public key

Not yet, I want SSH with password.

You saved me. From the scale system a pull from the core system works.

The only strange thing is that first an error message appears when creating the SSH connection:

[ESSLCERTVERIFICATIONERROR] [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate (_ssl.c:992)

After ignoring the message, it works. Is that correct?

If you are connecting without https, i think nothing to worry about. If i remember well was the same for me when tryng to establish a connection using internal LAN ip.
Glad to have helped you somehow :wink: and i think in the moment you fix the keypars you will be able to push too from the Core system

1 Like

OK, I will try this the next days. Thank you very much so far. :slight_smile:

1 Like