Rsync to a remote-server

    • OMV 3.x

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

    • Rsync to a remote-server

      Hello,

      i have a problem configuring a rsync job.

      What i want so set up:
      Copy a shared folder (local) to a remote server via ssh

      I configured the rsync-job as following:
      type: remote
      mode: push
      source shared folder: the shared folder
      destination server: user@ip (or in other tries: user@domain oder user@domain:port)

      What happens:
      When i start the job, rsync creates a synced folder, but not the remote server. It creates the folder with the files on a new local folder named like 'user@ip'

      What am i doing wrong? Can you help me sending the files to the remote server?

      Thank you very much.

      Yours,
      Alexander
      Images
      • rsync.PNG

        15.33 kB, 529×328, viewed 205 times
    • e36Alex wrote:

      destination server: user@ip (or in other tries: user@domain oder user@domain:port)
      The destination server field needs a folder or rsyncd module name ie user@domain::module_name or user@domain:/path/to/folder

      adlatus wrote:

      The path //user@ip/volume1/folder name I get the error: No such file or directory ...
      Try user@ip:/volume1/
      omv 4.0.5 arrakis | 64 bit | 4.12 backports kernel | omvextrasorg 4.0.2
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please don't PM for support... Too many PMs!
    • thank you very much. the issue that a local folder is created everytime i start the job seems to be solved. but i the backup itself still doesnt work.

      am i right, that this has to be a problem with the ssh-certificate or could it be a problem, that there ist no rsync running on the remote server?

      Source Code

      1. Identity added: /etc/ssh/openmediavault-2c03b974-7700-4a06-a0e2-a13f60b22855 (rsa w/o comment)
      2. Host key verification failed.
      3. rsync: connection unexpectedly closed (0 bytes received so far) [sender]
      4. rsync error: unexplained error (code 255) at io.c(226) [sender=3.1.1]
      I created a new ssh-key in omv, then i copied the public key to ssh-account in my webspace admin panel.

      do you have a hint for me, what am i doing wrong?

      thanks a lot!

      yours
      Alexander
    • adlatus wrote:

      belierzz wrote:

      For me rsync works well as follows:

      user@ip::volume1/folder
      test with user "admin" and password, did not work, get error:
      rsync: failed to connect to 192.168.178.14 (192.168.178.14): Connection refused (111)
      rsync error: error in socket IO (code 10) at clientserver.c(128) [sender=3.1.1]
      any ideas?
      The rsyncd server is not running on the remote side. Double colon means to connect to an rsync module (rsync server). Single column will attempt via ssh transport, does not need rsyncd server but it does need rsync binary on the remote side.
      chat support at #openmediavault@freenode IRC | Spanish & English | GMT+10
      telegram.me/openmediavault broadcast channel
      openmediavault discord server
    • rsync service is running on Diskstation
      try admin@ip:volume1/folder
      get error:

      Please wait, syncing </media/59efdee4-6db8-4823-b901-15fc49aaf8ed/Musik//> to <admin@192.168.178.14:volume1/MUSIK> ...


      Permission denied, please try again.
      Permission denied, please try again.
      Permission denied (publickey,password).
      rsync: connection unexpectedly closed (0 bytes received so far) [sender]
      rsync error: unexplained error (code 255) at io.c(226) [sender=3.1.1]

      What do I have to set on the Diskstation?
    • please differentiate in between rsyncd and rsync.

      From the syntax log it looks like you're attempting to use rsync with ssh and the remote server is expecting a private key. Is this correct?

      Can you please post a screenshot of the rsync task to understand what you're doing.

      adlatus wrote:

      What do I have to set on the Diskstation?
      I have no idea, what makes you think I have one? You should be the one telling us what is this device capable of.
      chat support at #openmediavault@freenode IRC | Spanish & English | GMT+10
      telegram.me/openmediavault broadcast channel
      openmediavault discord server
    • rsyncd is the server, it operates with modules which are the equivalent of shared folders in samba for putting an example.

      rsync is the binary would be the equivalent of the client

      The problem is you're attempting rsync over ssh with PASSWORD (a login password in the remote server). The rsync task configuration uses a env variable to pass the password to use with an rsync module (the rsync server) not an ssh login password. This is because omv UI is not interactive, it won't prompt for a remote password when required, remember you have to configure this as non interactive task, you won't be present when it executes.

      The rsync task cannot operate over ssh using system login password accounts. For using ssh in rsync you need the remote server with ssh server enabled with public key authentication, the private key needs to be passwordless.

      So question is can the ssh server be configured in the diskstation to use public/private key login ? or can the diskstation launch an rsyncd server?

      Another option would be to execute the rsync task in the diskstation so it pulls from omv using the rsyncd omv server.
      chat support at #openmediavault@freenode IRC | Spanish & English | GMT+10
      telegram.me/openmediavault broadcast channel
      openmediavault discord server
    • Danke für die Erklärung.


      Für den Import eines Zertifikates will die DS eine .cert und .key Datei.
      Ich habe versucht den public key auf die DS zu importieren, leider ohne Erfolg.
      Auf diesem Weg:
      chainsawonatireswing.com/2012/…on-with-ssh-keys//?from=@
      Alles leider ohne Erfolg.

      Ich habe auch keine Möglichkeit gefunden mit rsync die DS als Zielserver einzustellen (pull Methode).

      Ich gebe auf, ich weiss nicht was ich falsch mache und meine Linux Kenntnise sind zu schlecht.

      Google Translate:
      Thanks for the explanation.


      For the import of a certificate the DS wants a .cert and .key file.
      I tried to import the public key to the DS, unfortunately without success.
      In this way:
      chainsawonatireswing.com/2012/…on-with-ssh-keys//?from=@
      Everything unfortunately without success.

      I have also found no way with rsync to set the DS as a target server (pull method).

      I give up, I do not know what I am wrong and my Linux knowledge is too bad.