Problems with rsync

  • I get the following message when trying to use rsync, pulling from a linux computer to an openmediavault server:


    Please wait, syncing <dhal12@10.0.0.65:/home/dhal12/teaching_materials> to </srv/dev-disk-by-uuid-127f2176-9632-4d25-b7e0-fc483918ece3/bakupsdg/> ...

    Host key verification failed.

    rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]

    rsync error: unexplained error (code 255) at io.c(228) [Receiver=3.2.3]

    ERROR: The synchronisation failed.

    END OF LINE


    I suspect it has to do with host key verification having failed and the fact that ssh is being used and that a password or a passkey are required, but I have no idea how to fix this. I tried to search for solutions but I could not find anything. Any suggestions would be appreciated.











  • Rsync can run over ssh, but the connection needs to be established first, so you either need to manually establish the ssh session then run rsync or if you are trying to script and/or automate, you can use sshpass if it is standard password authentication (you will need to manually establish the connection once to accept the rsa key). You can also use a passwordless key authentication, but to be honest, I have never used this method, so I can’t guide you on how to set it up.


    sshpass(1) - Linux man page

  • I can manually backup the client to the server using rsync from a terminal window either on the server or the client without any problems, and I can set this up automatically. But this would be without using openmediavault. What I want is to backup clients to the server that has several disks attached to it, with the server running openmediavault. Can this be done? I thought since openmediavault offers rsync with the pull option, this would be possible...

  • It should be able to be done, but as I pointed out the error is about the authentication failing.


    Whenever I have set this kind of thing up before I have not used the plugin, but instead used a script with sshpass to do the ssh authentication in one rsync command or with a mount command to mount a share from the remote system run the rsync and then unmount, because I was doing more than just the rsync, such as testing for existence of certain files that would allow or disallow the rsync to run.


    The OMV rsync plugin does have a user/password field for remote connection, but is assuming that it is passing that information correctly to the remote system. This is something I have not tried. The issue may be on the remote system too, if for some reason it is rejecting the authentication.


    This is something you would have to check into.


    Someone that has more experience with the plugin may also be able to direct you better.

  • As this is an old post about rsync via ssh but all that showed up with my search with the key words "rsync ssh" I will take a stab at it

    I have used rsync via ssh with public private key with success.. After setting up your keys this is an example:


    .rsync -e ssh -avz /foldertobackup username@192.168.102.123: /foldertosendfilesto


    This works on OpenBSD and I am looking into how to setup this using the service this weekend...

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!