Wierd problem with rysnc.

Dave Dykstra dwd at bell-labs.com
Sat Jan 26 08:36:05 EST 2002


I tried reproducing it with 
    cat >exclude-file
    ath_version1/bin/cse_plot.csh
    ath_version1/bin/cse_plot.csh_shigeki
    ath_version1/bin/RCS/cse_plot.csh,v
    ^D
    mkdir -p d/x/ath_version1/bin/RCS
    mkdir -p h/x/ath_version1/bin/RCS
    echo hey >d/x/ath_version1/bin/cse_plot.csh
    echo there >h/x/ath_version1/bin/cse_plot.csh_shigeki
    echo guy >h/x/ath_version1/bin/RCS/cse_plot.csh,v
    ln -s cse_plot.csh_shigeki h/x/ath_version1/bin/cse_plot.csh
    rsync -av --delete --exclude-from=exclude-file --backup d/x/ h/x/ 
    echo you >d/x/ath_version1/bin/cse_plot.csh
    rsync -av --delete --exclude-from=exclude-file --backup d/x/ h/x/ 

Rsync changed nothing under "h" except for the timestamps of the directories.
Can you demonstrate the problem with a reproducible example?  What version
of rsync?  What operating system?

- Dave Dykstra


On Thu, Jan 24, 2002 at 04:17:18PM -0800, Sri Ramkrishna wrote:
> Okay, thats pretty fair.  Here is what I'm trying to say.
> 
> The source directory tree has:
> 
> /a/b/c/d/
> 
> which has a bunch of subdirectories (say x,y,z}  in it.  Because we don't 
> want to mirror every subdirectory in the d/ directory we have individual 
> rsyncs that copy different subdirectories to a destination tree.
> 
> The destination is 
> /f/g/h/i/
> 
> and I have an rsync command that looks
> like this thats run for each subdirectory in the source {x,y,z etc}.
> 
> rsync --archive --delete --backup --suffix=.backup
> -rsync-path=/some/stdpath/to/rsync --exclude-from=/var/tmp/exclude-file srchost:/a/b/c/d/x/ desthost:/e/f/g/h/x/
> 
> we do this for y, z subdirectories etc.
> 
> Each of these subdirectories {x,y,z} have certain subdirectories where
> there are files we want to exclude.  So lets say that the "x" subdirectory
> has a directory called "ath_version1".  There might be other directories like
> "ath_version2" also under the x/ directory tree. 
> 
> We have an exclude file that looks like this:
> ath_version1/bin/cse_plot.csh
> ath_version1/bin/cse_plot.csh_shigeki
> ath_version1/bin/RCS/cse_plot.csh,v
> 
> On the source side cse_plot.csh is a real file.  On the destination
> the cse_plot.csh is a symlink that points to cse_plot.csh_shigeki.
> 
> When rsync runs, the cse_plot.csh (a symlink) is replaced by the
> source copy of the cse_plot.csh file.  However, other files are not
> touched.  cse_plot.csh_shigeki for instance doesn't exist on the source
> side and is left alone.  We have put other symlinks that point to the
> cse_plot.csh_shigeki as well in there but those have been deleted not
> replaced with real files (because they is no corresponding file in the source
> to replace it)
> 
> The symlink cse_plot.csh points to cse_plot.csh_shigeki which is not in RCS.
> When we made a copy of cse_plot.csh_shigeki and checked in RCS, rsync didn't
> delete the copy. Seems the rsync can not handle symlink properly.
> 
> I sometimes add rsync with a --verbose --verbose --verbose option but the log
> doesn't tell me anythign about why it deleted the symlink.
> 
> Any help would be great.
> 
>    sri




More information about the rsync mailing list