symbolic links

Peter Sturdza psturdza at
Thu Dec 5 05:20:00 EST 2002

I don't see any option that works.  My problem is not
how it copies the links; it is that rsync will delete
a regular file and replace it with the symlink when
the file is newer than the symlink.  The file is
always erased with no backup.  This seems wrong.

Basically I use rysnc to keep files on two different
computers up to date.  Say I replace a symlink on one
computer with a file by the same name (perhaps because
I want to make a small change to this file but not
change the file that is being referred to by the
symlink), then rsync the two computers.  In this case,
rsync will always erase the updated file and replace
it with the older symlink.  

In general, I still do want to preserve symlinks and
use option -l, however it seems dangerous for a
symlink to overwrite a regular file without backups or
regard to timestamps.

This happens on Linux with rsync version 2.5.5.  


--- Dave Dykstra <dwd at> wrote:
> That's not a bug, it's a feature.  Note that the -a
> option is equivalent
> to -rlptgoD; replace it with all but the "l" and
> then look through the
> different options with the word "link" in it in the
> man page and see if
> one of them does what you want.
> - Dave Dykstra

Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.

More information about the rsync mailing list