Rsync just two folders, not whole shares

  • Hello. So, using the rsync interface in OMV I can successfully sync one share to another. But can´t find a way to enter commands to sync just two specific folders in these two different shares. I see a box to enter options, but not to specify folders...is there a way?


    Thanks!

  • KM0201

    Hat das Thema freigeschaltet.
    • Offizieller Beitrag

    Just create two new shared folders that point to the exact directories you want. Then use those shared folders in rsync.

    omv 7.7.10-1 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0.2 | kvm 7.1.8 | compose 7.6.10 | cterm 7.8.7 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.3.1


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


    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!

  • Just create two new shared folders that point to the exact directories you want. Then use those shared folders in rsync.

    Ah, that sounds brilliant. I tried, but...

    I set 2 shares: SyncHotMedia, encompassing the whole HotMedia drive/share, and a SyncDiscosOMV with the path SyncDiscosOMV/DiscosOMV/Media, so the HotMedia whole drive will sync with the folder Media inside DiscosOMV. I create the task as shown, then I add a new file to the HotMedia share, run the task in rsync...but nothing happens...what am I doing wrong? Guess I'm screwing some path...

    Thanks!

    • Offizieller Beitrag

    Your hotmedia sharedfolder is not in either synchotmedia or syncdiscos. So, rsync will not find anything.

    omv 7.7.10-1 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0.2 | kvm 7.1.8 | compose 7.6.10 | cterm 7.8.7 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.3.1


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


    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!

  • Your hotmedia sharedfolder is not in either synchotmedia or syncdiscos. So, rsync will not find anything.

    Ok, modified some paths and now it´s officially stranger...rsrs...it´s probably something obvious that I´m just not seeing...

    In the images you can see my setup. MediaHot folder is within SyncHotMedia share (/srv/dev-disk-by-uuid-19de6083-4776-4cf0-b3d0-47bac1747d73/SyncHotMedia/MediaHot)

    Setup to sync with the /DiscosOMV/Media folder within the SyncDiscosOMV share (/srv/dev-disk-by-uuid-8befd096-016b-4c60-9e52-b7c023d0231a/SyncDiscosOMV/DiscosOMV/Media).

    Setup is in the image. Archive and Recursive option checked.

    Run the task, nothing...should work...but...nope!

    I even tried CLI with this command but...nope!

    rsync /srv/dev-disk-by-uuid-19de6083-4776-4cf0-b3d0-47bac1747d73/SyncHotMedia/MediaHot /srv/dev-disk-by-uuid-8befd096-016b-4c60-9e52-b7c023d0231a/SyncDiscosOMV/DiscosOMV/Media

    also

    rsync -aud /srv/dev-disk-by-uuid-19de6083-4776-4cf0-b3d0-47bac1747d73/SyncHotMedia/MediaHot /srv/dev-disk-by-uuid-8befd096-016b-4c60-9e52-b7c023d0231a/SyncDiscosOMV/DiscosOMV/Media


    Can you see the problem? Thanks a lot...

    • Offizieller Beitrag

    How about instead of me figuring out what you are doing wrong, I tell you commands to try and these might help you understand what to setup.


    Does the second rsync command copy testfile1 to the destination?

    omv 7.7.10-1 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0.2 | kvm 7.1.8 | compose 7.6.10 | cterm 7.8.7 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.3.1


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


    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!

  • I´ll work on it and get back to you...Thanks!

    How about instead of me figuring out what you are doing wrong, I tell you commands to try and these might help you understand what to setup.


    Does the second rsync command copy testfile1 to the destination?

    • Offizieller Beitrag

    Yes, the second rsync copies testfile1 to the destination. If you run a third rsync, it won't do anything because testfile1 is already there.

    omv 7.7.10-1 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0.2 | kvm 7.1.8 | compose 7.6.10 | cterm 7.8.7 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.3.1


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


    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!

  • Yes, worked perfectly...now let me take the time to understand it in relation to what I did before and will come back with the evolution... I´m obviously still figuring out the file system...old dogs take longer to learn new tricks...

    I´ll be back...

    How about instead of me figuring out what you are doing wrong, I tell you commands to try and these might help you understand what to setup.


    Does the second rsync command copy testfile1 to the destination?

  • Great. Now I (you) made it work. Lots of tests to do before felling confident as there are few oddities (to me) related to the file structure yet. But looking at your structure I realized the origin folder has to be the shared folder itself and not any subfolders. So I eliminated the folder inside my share at the share folder definition and now it works. Added a -delete option to the command and now they synchronize perfectly.

    Thanks a lot for your time!

    Andre

    Yes, the second rsync copies testfile1 to the destination. If you run a third rsync, it won't do anything because testfile1 is already there.

Jetzt mitmachen!

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