rsync to a symlink directory
Gwendal Stevanazzi
stevanazzi at aleks.com
Tue Sep 24 01:04:01 EST 2002
Here is the structure of my servers :
Source :
/home/test1/link_dir
sub_dir1
file1
file2
...
sub_dir2
...
Destination:
/home/test2/real_dir
sub_dir1
file1
file2
...
subdir2
...
/home/test2/link_dir@ -> real_dir
Now I want to update file1.
If I run the command
rsync -aRz file1 destination:/home/test2/link_dir/sub_dir1
from /home/test1/link_dir/sub_dir1 on source, no problem, the file is
updated.
If I run the command
rsync -aRz link_dir/sub_dir1/file1 destination:/home/test2/
from /home/test1 on source, the new fs structure on destination is:
/home/test2/real_dir
sub_dir1
file1
file2
...
subdir2
...
/home/test2/link_dir
sub_dir1
file1
The symlink is erase and replace by a 'real' directory.
Is it the expected behaviour?
How could I prevent this kind of things to happen ?
More information about the rsync
mailing list