• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Rsync link-dest problem

scorpizz

New Member


Messages: 8

#1
Question: Is there a special way to use symbolic links in Rsync "--link-dest" ?

Setup is a rsync deamon running on the FreeBSD server with a path to a module storage.
On the client, rsync is executed with the following command:
rsync -ah --hard-links --link-dest=../test /home/user module@server::user/tmp

IF "test" on the destination is a directory, everything is woking as expected :)
But if "test" is a symbolic link on destination pointing to a directory in the same desination directory, the result is "--link-dest arg does not exist: ../test"

Code:
Working: (ls -l on server: /mnt/files/rsync_storage/user)
drwxr-x---  user  user   Oct 1 10:00 tmp
drwxr-x---  user  user   Oct 1 10:00 test

Not working: (ls -l on server: /mnt/files/rsync_storage/user)
drwxr-x---  user  user   Oct 1 10:00 tmp
lrwxr-x---  user  user   Oct 1 10:05 test -> /mnt/files/rsync_storage/user/tmp
(symbolic link is created with "ln -sfh source link_name")

Is there something that I have overlooked or does rsync not support symbolic links in the --link-dest option ?
 

aragats

Aspiring Daemon

Thanks: 287
Messages: 768

#2
I guess, you should use a trailing slash for a directory, thus it won't be confused with the symlink itself.
 

scorpizz

New Member


Messages: 8

#3
I guess, you should use a trailing slash for a directory, thus it won't be confused with the symlink itself.
Thanks for the suggestion.
I have tried adding the tailing slash to the "../test/" and for that matter the "::user/tmp/", but unfortunally it didn't solved the problem.
Also re-checked that the symlink on the server is working when accessed from the local shell on the server.