Rsync Push - Linux to OMV - the proper way?

  • Hi all. First off, I am using an Odroid HC2 with OMV strictly for offsite PC back ups (using OpenVPN). I am migrating from Windows to Linux Mint and have moved all my data from Windows to OMV using one SMB/CIFS share, called MeteoraData. This worked fine. From within Linux, I can use Nautilus to access the share just like in Windows and see all files and directories.


    But as I attempt to use rsync in Linux to push data to OMV, I appear to be accessing the file system on the SD card, not my share above. And I'll just say that I am not a Linux guru one bit, which will be clear in a moment...


    The following example creates a folder "RsyncTest" somewhere OTHER than my shared folder above. I can see it if I SSH into OMV.


    rsync -r -n -t -v --progress -s /home/zayden/Desktop/Source Zayden@10.10.10.20:RsyncTest


    Could not chdir to home directory /home/Zayden: No such file or directory **I have not enabled home directories in OMV**
    sending incremental file list
    created directory meteoradata
    Source/
    Source/00404_fxxJogsfG1e_1200x900.jpg
    Source/00BERKELEY-5-superJumbo.jpg
    Source/00C0C_itXGhDP0cc7_1200x900.jpg
    Source/01212_27pPo28IF4m_1200x900.jpg
    Source/166382_1529191753470_6637382_n.jpg
    ----


    How can rsync access the shared folder I created already? And if this is the wrong way to do it, what is the right way to use rsync to push data from a local Linux PC to remote OMV? I see rsync options within OMV, but that appears to be to push data elsewhere or pull data which I don't want to do. All I need is to mirror my folder structure, preferable to where I already spent 2 days migrating the bulk of it. :rolleyes:

  • I got this to work by enabling NFS and changing my destination to:


    rsync -r -n -t -v --progress -s /home/zayden/Desktop/Source Zayden@10.10.10.20:/export/MeteoraData/RsyncTest

    While this works for me, is this set up ok? Any way I could just use the SMB/CIFS since I have that enabled for Windows? If so I guess all I am missing is the mount point?


    EDIT: No longer working...

    Now after a reboot this no longer works. Getting the following error:


    rsync: ERROR: cannot stat destination "/export/MeteoraData/RsyncTest/": Permission denied (13)
    rsync error: errors selecting input/output files, dirs (code 3) at main.c(653) [Receiver=3.1.2]
    Rsync process exit status: 3


    Hopefully someone could chime in and tell me what I'm doing wrong. ||

  • You have to use the full local path on the HC2 to where you want the file to end up on the HC2. As if you have connected using SSH. Because that is what you do with "Zayden@10.10.10.20:"


    And user Zayden on the HC2 has to have write rights there.


    For instance:


    rsync -a /home/zayden/Desktop/Source Zayden@10.10.10.20:/sharedfolders/nameofshare/destination


    You can also use SMB/CIFS or NFS. But then you have to first mount the remote server somewhere and then use the path relative from there.


    For instance:


    (create a mount point folder and mount a remote share there)


    rsync -a /home/zayden/Desktop/Source /path/to/mountpoint/destination

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

Participate now!

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