Major rsync issue - overwriting files!!!

Jamie Lokier jamie at
Fri Mar 28 13:50:32 GMT 2008

Nathan Griffiths wrote:
> The thing is, the same script (with different source/destination 
> variables) runs FLAWLESSLY on another file server!

I'm thinking the spaces in some of your paths are quite significant.

The shell script does not quote spaces properly in $LINK_DEST, when
that's saved in $OPTS, and when $OPTS is used later.  (You need an
'eval' and different quoting to do what you seem to be trying to do,
and keeping the spaces quoted.)

On top of that, sometimes rsync splits arguments on spaces itself too,
and extra backslashes must be added to prevent that.  (I'm not sure if
it does in your example).

-- Jamie

More information about the rsync mailing list