Rsync over SSH | Works but copies data on remote user home instead of server's module

  • Hi everyone,


    I've been using rsync on OMV for 3 years now from a MacBook to OMV through the Internet with great success
    Instead of backuping data with rsync (port 873), I decided to secure the thing and execute rsync over ssh (port 22).
    It works great but... on my remote OMV machine, the rsync server modules do not appear to be used. Data sent to the server is stored into the user's home, instead of being stored where the server's module points to (a shared OMV directory). Please note that it was working as intented with my previous configuration (port 873).
    I can't find the solution having gone through a good number of web pages (Internet and OMV forums pages)...
    Can anyone help me out on this please?
    Many thx in advance

    HP Proliant Microserver N40L - 8Go RAM - ESXi 6 - 1*250Go + 2*3To + 1*650Go - OMV 2.x installed

  • Sorry, here it is (one long command line, but very effective for the past years ;) :
    /usr/local/Cellar/rsync/3.1.1/bin/rsync
    --rsh=ssh --protocol=30 --recursive --delete --delete-excluded --compress
    --skip-compress=CR2/MOV/JPG/tif/tiff --info=progress2 --partial
    --ignore-existing --max-size=14M --exclude='.DS_Store' --exclude='.fseventsd'
    --exclude='.Spotlight-V100' --exclude='.TemporaryItems' --exclude='.Trashes' --filter='exclude *.MOV' --files-from=/Users/Tugdual/Pictures/Famille/rsync-list-of-dirs-to-transfer
    /Users/Tugdual/Pictures/Famille/ tugdual@REMOTE_IP_ADDRESS:images-famille-2015-rsync

    HP Proliant Microserver N40L - 8Go RAM - ESXi 6 - 1*250Go + 2*3To + 1*650Go - OMV 2.x installed

  • Thanks SubZero. This is the new command that I'm trying to make work (it does work when I replace the module name "images-famille-2015-rsync" with the remote path, but I'm surprised the server module I configured does not work).


    In your example, you're using the root account, while I'm trying to do the rsync over ssh with a normal account (my root account is disabled for remote access over ssh for security reasons). And I guess, unfortunately, the problem comes from there. With root I'm almost certain the remote server module would have been used while, with a normal user, for some reason, the remote rsync server doesn't use the module but instead uses the module's name as a directory and syncs the data in /home/Tugdual/images-famille-2015-rsync, which shouldn't happen...


    Yesterday, after my post, I found this page http://olddoc.freenas.org/index.php/Rsync_Tasks that let me think it is NOT possible to uses rsync modules over ssh... (see 4th line of table 4.4a, line "Rsync mode").


    Let me know if you have other ideas.
    Thanks

    HP Proliant Microserver N40L - 8Go RAM - ESXi 6 - 1*250Go + 2*3To + 1*650Go - OMV 2.x installed

    • Offizieller Beitrag

    Rsync always has its workarounds, found this one, very old.


    https://lists.samba.org/archiv…c/2005-August/013371.html


    You can check your rsyncd daemon logs, an error will come like


    rsync: unable to open configuration file "rsyncd.conf": No such file or directory (2)


    Zitat

    If you supply -e ssh ... as parameters to rsync in combination with the
    :: syntax, ssh is used to start a new rsync in daemon mode. If you're
    not doing that as root, the default location for the config file is
    rsyncd.conf in the current directory (typically $HOME). Hence it can't
    find rsyncd.conf in ~USER/.


    Copy /etc/rsyncd.conf to your home user directory, this time it should work, at least it worked in mine

Jetzt mitmachen!

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