I am trying to rsync from one server to another. The servers have the same directory structure but I am having trouble getting the remotes server to properly recognize the path name on the remote when there is a space in it.
Here are the details
The local directory is
mnt/xlses/split/v2/name with space
The remote directory is
mnt/xlses/split/v2/name with space
I have tried everything I can find the latest attempt was
rsync --size-only -avzPe ssh /mnt/xlses/split/v2/name\ with\ space/ root@myserver.com:/mnt/xlses/split/v2/"name with space"
when that runs the first thing it reports is that it is creating a new directory
I interrupt it and see that there is a new directory
mnt/xlses/split/v2/name
all of my files are in that directory
I was expecting them to be in
mnt/xlses/split/v2/name with space
man rsync
and searching (/s
) for "--protect". To install with homebrew:brew install homebrew/dupes/rsync
If not found runbrew search rsync
. – MikeiLL Jun 01 '15 at 17:08rsync -Pavuz 'you@host:~/file\ with\ spaces' ./
– ocodo Dec 11 '15 at 09:33--secluded-args, -s
in rsync 3.2.6. Seeman rsync
. – user598527 Jun 08 '23 at 10:42