Rsync - Pull mode

    • OMV 4.x
    • Resolved
    • Rsync - Pull mode

      Hi,

      I'm a little lost with the configuration of rsync in pull mode.

      I explain :
      I have an OMV server on which I want to backup a "music" folder located on Volumio - another remote server.
      On OMV, I created the module indicating the shared folder but :
      • What is the user and the group ? (by default : nobody/user)

      • Is it the rsync user of the remote server ?
      Also
      • What should I create on the remote server (Volumio) ?
      • Do I need to create the same configuration file (/etc/rsyncd.conf) ?
      Thank you for your clarifications
    • I suggest that you enable SSH on the Volumio device. Then you can simply run a rsync command to make a backup using file transfer over SSH. Not the fastest, but reliable.

      Perhaps as a crontab job. Perhaps in a script. Perhaps flesh it out with a test to check if the Volumio device is available and do versioned and timestamped snapshots.

      The default SSH user on a Volumio device is user:volumio, password:volumio. You may want to create a user "volumio" on your OMV server and add her to group "users". Just to be safe. Check in volumio what user owns the music files. No need to ever login as that user on the OMV server, but may be good to preserve ownership..

      Something like:

      Source Code

      1. sshpass -p "volumio" rsync -a volumio@192.168.1.123:/path/to/music/files/ /path/to/backup
      OMV 4, 5 x ODROID HC2, 2 x 12TB, 2 x 8 TB, 1 x 500 GB SSD, GbE, WiFi mesh

      The post was edited 1 time, last by Adoby ().

    • Adoby wrote:

      Then you can simply run a rsync command to make a backup using file transfer over SSH.
      The rsync plugin allows you to do this all from the web interface.

      booga wrote:

      On OMV, I created the module indicating the shared folder but :
      The remote server needs the module.

      booga wrote:

      What is the user and the group ? (by default : nobody/user)
      Depends on the shared folder permissions and whether you are using rsync or rsync over ssh.

      Search the forum for the guide on doing this.
      omv 4.1.15 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Thank you both !!

      Adoby wrote:

      I suggest that you enable SSH on the Volumio device. Then you can simply run a rsync command to make a backup using file transfer over SSH. Not the fastest, but reliable.
      I really wanted to set up the rsync in pull mode for knowledge purposes.
      I'm keeping your solution. It actually simplifies.


      ryecoaaron wrote:

      The remote server needs the module.
      Does it also need the configuration file /etc/rsyncd.conf ?

      ryecoaaron wrote:

      Search the forum for the guide on doing this.
      I did it but the client-side configuration in pull mode is rarely mentioned


      Anyway thank you again.
    • booga wrote:

      Does it also need the configuration file /etc/rsyncd.conf ?
      I don't know anything about the remote server but you normally need a config for the rsyncd daemon.

      booga wrote:

      I did it but the client-side configuration in pull mode is rarely mentioned
      Push and pull are the same with the settings reversed.
      omv 4.1.15 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Thank Adoby for your additional information. I'll take this path if rsync doesn't work ;)


      Otherwise a few last questions :
      Access via rsync daemon (PULL): rsync [OPTION...] [USER@]HOST::SRC... [DEST]
      • [USER@] : Which user is it ?
      • SRC : Can we put the path directly (/mnt/media/music) ?
      • [DEST] : Is it the module ? What syntax should I use ? Absolute or relative paths ?
    • booga wrote:

      Which user is it ?
      It is in brackets because it is optional. It depends on how the rsyncd server is setup. If you have user auth setup, then you would need to specify a username and password.

      booga wrote:

      Can we put the path directly (/mnt/media/music) ?
      You can but if you have a module setup on the server, you can just specify the module name.

      booga wrote:

      Is it the module ? What syntax should I use ? Absolute or relative paths ?
      No, if you are pulling, the destination is the path on the pulling server. It is an absolute path. Are you trying this from the command line?
      omv 4.1.15 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Here I assume you run the backup from a laptop on the same network as the volumio box and with a mounted share to the OMV NAS. 192.168.1.123 is the ip to the Volumio box.

      sshpass -p "volumio" rsync -a volumio@192.168.1.123:/path/to/music/files/ /path/to/backup

      volumio volumio.

      sshpass -p is to avoid a question from rsync about volumio password. Not safe, but might be OK to a volumio box...

      SRC: You specify user@ip-to-host:/path/on/host on the the host. user is volumio.

      DEST is the path as seen from the computer where you launhced the command. This is an existing share you can write to,

      So in pull mode source is remote. Destination is local. but destination may be on a share on a OMV NAS, that is mounted on the local computer.

      So if I wanted to backup a volumio box from my laptop I'd launch a command similar to this:

      sshpass -p "volumio" rsync -a volumio@192.168.1.123:/music/ /media/nfs/nas3/snapshots/volumio/music

      No need to login to the volumio box or the OMV NAS. I just use the available SSH on Volumio and the existing mounted share to the NAS on my laptop.

      (Actually I'd most likely run a script that creates a timestamped versioned snapshot and automatically purges old snapshots. But otherwie similar to the command.)
      OMV 4, 5 x ODROID HC2, 2 x 12TB, 2 x 8 TB, 1 x 500 GB SSD, GbE, WiFi mesh
    • Voilà... it's done ! Pull mode works.
      Finally, it was so easy. No password, no ssh because it's on a local network. Just had to create a client-side configuration file and specify a module.

      ryecoaaron wrote:

      Are you trying this from the command line?
      Yes. Just to understand. The GUI confuses me. Anyway... Thank you ryecoaaron.
      And thank you so much Adoby for your explanation ! :)