0

I have set up an Rsync job to backup my Nextcloud data folder (NC on a Raspberry Pi, Raspbian Stretch, on my local network) to my OMV server (Debian Stretch, OMV 4.1.19). So far I did the following:

  • As the Nextcloud data folder is owned by www-data, I created a user "NCrsync" on the Pi and added it to the www-data group

  • In the OMV GUI, I created a new SSH key and tried to copy the public key to the Pi which failed as the GUI can't handle the "Trust this RSA key" prompt. So I created the file /home/NCrsync/.ssh/authorized_keys on the Pi, copied the public key from the OMV GUI and pasted it into this file

  • Set up an Rsync job in the OMV gui with the following settings:

Type: Remote
Mode: Pull
Source server: NCrsync@<pi-ip>:/media/hdd1/data
Destination folder: shared folder on my OMV server
Authentication: Public key
SSH port: 22
SSH certificate: nc-rsync

However, if I start the Rsync job, it fails:

Please wait, syncing <NCrsync@<pi-ip>:/media/hdd1/data> to <path-on-server> ...
​
​
Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at io.c(235) [Receiver=3.1.2]
​
​
The synchronisation has completed successfully.
Done ...

What could be the reason for this to fail?

Thank you very much in advance!

1 Answer 1

1

AFAIK, OMV rsync jobs are running on root account with cron.
I thought that you have to add a hostkey to /root/.ssh/known_hosts on OMV.

I don't know how to do it via GUI.
So I once logged-in OMV with ssh, then invoked 'sudo -i' and 'ssh remote-server'.

I hope this will help you :-)

1
  • Thanks, I'll try that!
    – iYassin
    Aug 20, 2019 at 18:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .