symbolic links
Dave Dykstra
dwd at drdykstra.us
Thu Dec 5 14:21:02 EST 2002
Personally I don't see why see why replacing a file with a symbolic
link is any more dangerous than replacing it with a different file.
Doesn't it back up the file if you use the --backup option? If you use
the --update option rsync shouldn't replace any file or symlink that is
newer than the either that is older, will that help?
- Dave
On Wed, Dec 04, 2002 at 09:19:44PM -0800, Peter Sturdza wrote:
>
> 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.
>
> Peter
>
> --- Dave Dykstra <dwd at drdykstra.us> 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.
> http://mailplus.yahoo.com
More information about the rsync
mailing list