Rsync from remote server

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Rsync from remote server

      Greetings,

      I am just getting started with OpenMediaVault and have got everything up and running on the LAN side of things, but would like to also set up Rsync to automatically download the files folder on my remote torrent seedbox.

      I have SSH access to the remote machine, and it does have rsync installed. So far I have been able to ssh into the remote machine from both the OMV CLI as well as from Terminal in OSX and have confirmed that Rsync is up and running, but for some reason whenever I try it from within the Rsync Jobs on the WebUI in OMV, I get errors.

      With the command: username@remotesever.com:873/filedirectory/ in the source server address, I get the following error when executing the job.

      opening connection using: ssh -l username remoteserver.com rsync --server --sender -vvlogDtprSze.iLsf . 873/filedirectory/
      Permission denied, please try again.
      Permission denied, please try again.
      Permission denied (publickey,password).
      rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
      rsync error: unexplained error (code 255) at io.c(601) [Receiver=3.0.7]

      Like I said, I have logged into the remote machine via SSH in the CLI on the OMV machine and it has stored the password certificate, but it seems like it's not being accessed.

      Any ideas?
    • Re: Rsync from remote server

      For me it is also impossible to rsync into a remote server. I don't want to push files, but pull them. But I have the same issue. The remote server says the password is invalid. I can ssh with the account just fine.

      It seems like the password is not saved, because when I click on show password in the rsync job edit box, it shows nothing.

      As it is now, rsync seems broken to me if you want to connect to a remote server.
    • Re: Rsync from remote server

      "Spy Alelo" wrote:

      It works for me. I was able to migrate from one NAS to another with no trouble. Is obviously a permission issue. Did you try to run the job as root?

      When you open your rsync job, and you click on the view password icon, do you get to see the password?
    • Re: Rsync from remote server

      No. That will not even work with the users within OMV, and yet I have no issues. Volker may have done that as a security measure, but I'm not sure.

      *Edit: I see what you mean. Even though I have no issues with the password, when I tell it to reveal it, it just shrinks the bar to nothing. That's a bug, feel free to report it. But again, other than an annoyance, it doesn't seem to affect my scheduled jobs. You haven't said if you have tried the job as root yet. Try that before you do anything else.
    • Re: Rsync from remote server

      "Spy Alelo" wrote:

      No. That will not even work with the users within OMV, and yet I have no issues. Volker may have done that as a security measure, but I'm not sure.

      *Edit: I see what you mean. Even though I have no issues with the password, when I tell it to reveal it, it just shrinks the bar to nothing. That's a bug, feel free to report it. But again, other than an annoyance, it doesn't seem to affect my scheduled jobs. You haven't said if you have tried the job as root yet. Try that before you do anything else.

      If I cat the crontab file, I see that the job is supposed to run as root. And if I run it as root, it does run fine. So that's fine. I guess that if you run the job manually from the web GUI, something goes wrong.
    • Re: Rsync from remote server

      If I run the whole command from /var/lib/openmediavault/cron.d/rsync-35b4984d-08d3-4efc-b936-fc8358d8e593 on the CLI, I get prompted for the password, even though it is supposed to be set with env:

      root@nas:~# env RSYNC_PASSWORD="mypassword" rsync --verbose --log-file="/var/log/rsync.log" --times --archive --perms "/media/40652bec-bc5e-4238-a427-1d7077560ecb/wortel/Pictures//" "rsync@192.168.0.123:/mnt/HD_a2/Backup/Pictures"
      rsync@192.168.0.123's password:

      I guess that is the problem. Any idea why this is?
    • Re: Rsync from remote server

      OK, I found the problem. The way I defined my target, resulted in ssh being used as the transfer protocol. The variable RSYNC_PASSWORD does not work when using ssh:

      RSYNC_PASSWORD
      Setting RSYNC_PASSWORD to the required password allows you to
      run authenticated rsync connections to an rsync daemon without
      user intervention. Note that this does not supply a password to
      a shell transport such as ssh.


      That explains why for some it works and for some it doesn't.

      If I connect to the module and use double colons, it works fine:

      env RSYNC_PASSWORD="mypassword" rsync --verbose --log-file="/var/log/rsync.log" --times --archive --perms "/media/40652bec-bc5e-4238-a427-1d7077560ecb/wortel/Music//" "rsync@192.168.0.123::Backup/Music"
      instead of
      env RSYNC_PASSWORD="mypassword" rsync --verbose --log-file="/var/log/rsync.log" --times --archive --perms "/media/40652bec-bc5e-4238-a427-1d7077560ecb/wortel/Music//" "rsync@192.168.0.123:/mnt/HD_a2/Backup/Music"