Solved Using symlinks in 'rsync' module. How?

Hello all!

Trying to setup 'rsync' server to use symlinks in module within destination path. Have directory structure something like this:

Code:
-- /path/to/the/module/folder
   -- symlinkToOtherPhisicalFolder1
   -- symlinkToOtherPhisicalFolder2
   -- symlinkToOtherPhisicalFolder3

Physically symlinks pointed on folders outside of the module. Module defined in '/usr/local/etc/rsyncd.conf':

Code:
[modulename]
    path = /path/to/the/module/folder
    uid = user
    gid = group
    read only = no
    list = yes
    use chroot = yes # tried without it
    munge symlinks = no # tried without it

Command from client:

Code:
rsync -azv file.txt rsync://server.domain/modulename/symlinkToOtherPhisicalFolder1

Result this:

Code:
sending incremental file list
rsync: [Receiver] change_dir#3 "/symlinkToOtherPhisicalFolder1" (in storage) failed: No such file or directory (2)
rsync error: errors selecting input/output files, dirs (code 3) at main.c(834) [Receiver=3.4.1]

Tried different parameters: '-k', '-K', '-l', '-L',. For now everything that is using by my turned symlink into file.

What is missing by me? How to make 'rsync' handling properly destination path in module within symlinks and without (!) SSH? Only using by 'rsync' protocol.

Should it be using 'temp' dir? For the first step sync file to this dir and after moving it to the destination folder? If yes how to setup it properly?

Code:
$ rsync --version
rsync  version 3.4.1  protocol version 32

$ uname -mrs
FreeBSD 14.4-RELEASE-p3 amd64
 
The cause of the troubles found. It's physical location of the folder outside of the module root folder. When symlinks pointed on some folders inside of the module all is working.

Code:
rsync -rL file.txt rsync://server.domain/modulename/symlinkToTheFolder1

Is there way to use paths for symlink outside module?
 
Back
Top