Bug 2409 - rsync doesn't handle directories changing into symlinks well
rsync doesn't handle directories changing into symlinks well
Status: CLOSED WONTFIX
Product: rsync
Classification: Unclassified
Component: core
2.6.3
All Linux
: P3 normal
: ---
Assigned To: Wayne Davison
Rsync QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-02 08:46 UTC by Arthur de Jong
Modified: 2005-04-01 11:21 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arthur de Jong 2005-03-02 08:46:07 UTC
If I change a direcotry to a symlink with the same name on the source rsync
produces an error:

% mkdir -p foo/bar/foo bar
% rsync -a -v foo/ bar/
building file list ... done
./
bar/
bar/foo/

sent 90 bytes  received 20 bytes  220.00 bytes/sec
total size is 0  speedup is 0.00
% rm -rf foo/bar
% ln -s foo foo/bar
% rsync -a -v foo/ bar/
building file list ... done
./
rsync: delete_file: rmdir "/tmp/1/bar/bar" failed: Directory not empty (39)
rsync: symlink "/tmp/1/bar/bar" -> "foo" failed: File exists (17)

sent 90 bytes  received 20 bytes  73.33 bytes/sec
total size is 3  speedup is 0.03
rsync error: some files could not be transferred (code 23) at main.c(702)
Comment 1 Wayne Davison 2005-03-02 11:08:12 UTC
That's a safety feature.  Either use --force to force a recursive delete of
directories that are in the way of non-directories, or enable --delete (if
appropriate for your situation).