Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rsync (cwrsync) in Gitbash - The source and destination cannot both be remote. [windows 7]

I am trying to sync a local path to another drive using Git Bash in Windows 7. I downloaded cwRsync and copied the files over to my Git bash bin directory. I can run rsync but the following command gives me problems

rsync -av /c/00-dev/05-batch /f/RSYNC/ The source and destination cannot both be remote. rsync error: syntax or usage error (code 1) at main.c(1135) [receiver=3.0.6]

Both the paths are correct but it won't sync.

like image 353
Reptile Avatar asked Apr 29 '15 11:04

Reptile


1 Answers

Workaround: cd to /c and rsync using relative paths.

So this works:

cd /c
touch temp/test.txt
rsync temp/test.txt temp/test2.txt

while this doesn't, even if you cd to /c:

$ rsync /c/temp/test.txt /c/temp/test2.txt
The source and destination cannot both be remote.

Tested with the Git Bash that came with git 2.9.0.windows.1.

like image 96
Jon Olav Vik Avatar answered Sep 18 '22 13:09

Jon Olav Vik