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:


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

    Be smart - be lazy. Clone your rootfs.
    OMV 5: 9 x Odroid HC2 + 1 x Odroid HC1 + 1 x Raspberry Pi 4

    Edited once, last by Adoby ().

  • 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.


    On OMV, I created the module indicating the shared folder but :

    The remote server needs the module.


    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 5.5.23 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.4.5
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Thank you both !!

    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.



    The remote server needs the module.

    Does it also need the configuration file /etc/rsyncd.conf ?

    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.

  • 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.


    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 5.5.23 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.4.5
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • This type of job I'd run from my laptop. Not from the OMV NAS. Launch rsync on the laptop and let it use SSH over WiFi to copy the files from the volumio box and use nfs over WiFi to copy the files to the OMV NAS.

    Be smart - be lazy. Clone your rootfs.
    OMV 5: 9 x Odroid HC2 + 1 x Odroid HC1 + 1 x Raspberry Pi 4

  • 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 ?
  • 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.


    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.


    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 5.5.23 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.4.5
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    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.)

    Be smart - be lazy. Clone your rootfs.
    OMV 5: 9 x Odroid HC2 + 1 x Odroid HC1 + 1 x Raspberry Pi 4

  • 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.


    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 ! :)

  • 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.


    Yes. Just to understand. The GUI confuses me. Anyway... Thank you ryecoaaron.And thank you so much Adoby for your explanation ! :)

    This is the most convoluted Rsync setup I've ever messed with.


    Why not just give the admin a line for an Rsync command.. why jump through all of these hoops? I can go to the command line and rsync from dest -> local OMV just fine, but this isn't working from this rsync module.


    Does anyone have a straight forward way to make this Pull work?

  • @Cori maybe this link will help:
    Rsync Two OMV Machines
    Works for me. Seems like I had to fiddle with the command a bit so if you have trouble post back and I will look up the way I set it up.

    Simple and sure backup and restore: In a Scheduled Job: rsync -av --delete /srv/dev-disk-by-label-SOURCE/ /srv/dev-disk-by-label-DESTINATION/ (HT: Getting Started with OMV5)
    OMV 5 (current) - Hardware: Thinkserver TS140, Nextcloud, Plex, Airsonic, Navidrome, Ubooquity, Digikam, & Heimdall - NanoPi M4 (v.1), backup - Odroid XU4, Pi-Hole (DietPi) - Testing/Playing: hc2, xu4, Pi 3B+, Odroid H2. Mac user trying to convert to Linux on a HP dx2400, Debian 10 XFCE.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!