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

    • Offizieller Beitrag

    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
    • Offizieller Beitrag

    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 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    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.

    • Offizieller Beitrag

    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 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    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 ?
    • Offizieller Beitrag

    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 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

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

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

    I is the quizat haderach
    --
    OMV 4.x - Raspi 4 4g 4tb R1

    • Offizieller Beitrag

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

    System Backup Typo alert: Under the Linux section the command should be sudo umount /dev/sda1 NOT sudo unmount /dev/sda1

    Backup Data Disk to Backup Disk on Same Machine: In a Scheduled Job:rsync -av --delete /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c20ea3/ /srv/dev-disk-by-uuid-e67439d5-00a3-4942-bd5f-b84ab86aa850/ Don't forget trailing slashes, and BE CAREFUL. (HT: Getting Started with OMV5)

    Equipment - Thinkserver TS140, NanoPi M4 (v.1), Odroid XU4 (Using DietPi): PiHole

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!