Hello, I think I found a bug in rsync. I checked the TODO and the issues, but I didn't find any reference to it. It seems, that rsync goofes up, if you rename a directory and then create a symlink with the old name to the new location. Below is a simple example how to do it. ------------------------------------------------------------------------------ [ptriller] elmore:~/test> ls -alinsgesamt 11 drwxr-xr-x 4 ptriller users 96 2003-04-18 19:23 . drwx--x--x 82 ptriller users 9160 2003-04-18 19:23 .. drwxr-xr-x 2 ptriller users 48 2003-04-18 19:24 dest drwxr-xr-x 3 ptriller users 72 2003-04-18 19:23 src [ptriller] elmore:~/test> ls -al src/insgesamt 2 drwxr-xr-x 3 ptriller users 72 2003-04-18 19:23 . drwxr-xr-x 4 ptriller users 96 2003-04-18 19:23 .. drwxr-xr-x 2 ptriller users 72 2003-04-18 19:23 a [ptriller] elmore:~/test> ls -al src/ainsgesamt 5 drwxr-xr-x 2 ptriller users 72 2003-04-18 19:23 . drwxr-xr-x 3 ptriller users 72 2003-04-18 19:23 .. -rw-r--r-- 1 ptriller users 10 2003-04-18 19:23 file.txt [ptriller] elmore:~/test> ls -al dest/insgesamt 1 drwxr-xr-x 2 ptriller users 48 2003-04-18 19:24 . drwxr-xr-x 4 ptriller users 96 2003-04-18 19:23 .. [ptriller] elmore:~/test> /usr/bin/rsync -av src destbuilding file list ... done src/ src/a/ src/a/file.txt wrote 156 bytes read 36 bytes 384.00 bytes/sec total size is 10 speedup is 0.05 [ptriller] elmore:~/test> cd src/[ptriller] elmore:~/test/src> lsa [ptriller] elmore:~/test/src> mv a b[ptriller] elmore:~/test/src> ln -s b a[ptriller] elmore:~/test/src> cd ..[ptriller] elmore:~/test> /usr/bin/rsync -av src destbuilding file list ... done src/ delete_file: rmdir(src/a) : Directory not empty rsync: symlink "src/a" -> "b": File exists src/b/ src/b/file.txt wrote 177 bytes read 36 bytes 426.00 bytes/sec total size is 11 speedup is 0.05 rsync error: some files could not be transferred (code 23) at main.c(620) (errno=23) [ptriller] elmore:~/test>----------------------------------------------------------------------------- regards Peter Triller
> It seems, that rsync goofes up, if you rename a directory and then > create a symlink with the old name to the new location.You need to use the --force option in addition to -a See also: --delete and --delete-excluded -- Francis.Montagnac@sophia.inria.fr, Tel: (33) 04 92 38 79 11, Bur: C112 INRIA Sophia, 2004, rte des Lucioles, B.P.93 - 06902 Sophia Antipolis Cedex