Wierd problem with rysnc.

Sri Ramkrishna sramkris at ichips.intel.com
Fri Jan 25 11:17:18 EST 2002

Okay, thats pretty fair.  Here is what I'm trying to say.

The source directory tree has:


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 

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:

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.


   On Wed, Jan 23, 2002 at 01:26:55PM -0600, Dave Dykstra wrote:
   > I am unaware of anybody else reporting a similar problem.  My guess is that
   > your experimentation with different rsync exclude options is actually the
   > cause of the problem; they can be very tricky to understand.  Give us the
   > complete command line you're using and describe in detail exactly what
   > is happening, including file names.  If you can narrow it down to a simple
   > example that somebody else could follow to reproduce the problem, that
   > would be the best.
   > - Dave Dykstra
   > On Wed, Jan 23, 2002 at 10:52:21AM -0800, Sri Ramkrishna wrote:
   > > I'm responding to my own mail.  I'm adding some extra detail.  Yesterday,
   > > we added another symlink that points to the same file as the symlink that
   > > was being deleted.  The symlink was put into the excluded file and when
   > > the test was run, the sample symlink was intact but the original symlink was
   > > removed and still nothing in the logs saying it had removed the file.
   > > 
   > > When we removed the symlink and replaced it with a file then the file 
   > > was untouched while the symlink was deleted.
   > > 
   > > sri
   > > 
   > > On Tue, Jan 22, 2002 at 10:29:10PM -0800, Sri Ramkrishna wrote:
   > > > 
   > > > Hi folks, I'm having a problem with my rsync between two areas between a WAN.
   > > > The problem is really odd.  I have a script that runs every night.  Lately,
   > > > we've been having problems with rsync.  The source side is an ordinary file
   > > > while the destination side is a symlink.  We've been having problems with rsync
   > > > deleting the symlink and repacing it with the source copy despite having it in
   > > > the exception list.
   > > > 
   > > > The problem only occurs sporadically, it might not happen one day but happen at
   > > > another.  I ruled out some other process deleting it by running the script at a
   > > > certain time after putting the symlink back.  I had tried putting exceptions
   > > > for the whole directory and that didn't help either.  I also ran it with a
   > > > couple of verbose options and the log of that didn't show it had deleted
   > > > anything ever though after the script ran the symlink disappeared.
   > > > 
   > > > So, I'm looking for a litle advice on how to proceed?  Thanks!
   > > > 
   > > > sri

More information about the rsync mailing list