Why isn't -r working for rsync on Windows?

1

I am running this from my command prompt: rsync -rltz --executability -C --filter=':- .gitignore' -e "ssh -i /cygdrive/c/Users/dstein/.ssh/id_rsa" myfolder/ root@site.local:/path/to/place

I have my PATH environment avriable pointing to cygwin/bin so I can use rsync without being in cygwin, which was causing a number of other issues.

I finally got it working so if I change a file in myfolder it uploads to place. However if I edit any files that are further nested in myfolder the above command is not working for those.

EDIT It turns out that it's not the depth, but this specific folder with the name core It has the same permissions as all the other folders that are syncing fine.

Dave Stein

Posted 2013-06-06T21:46:56.770

Reputation: 37

Also tried -a to kicks to no avail – Dave Stein – 2013-06-06T21:54:25.717

Is your directory named core by any chance? – Aintaer – 2013-06-06T23:08:02.123

You missed my edit ;) – Dave Stein – 2013-06-07T02:46:03.130

Answers

0

It appears that your issue is with the -C flag. rsync's -C flag is the cvs exclude rule. It automatically ignores files that matches CVS's internal rules for excluding files.

These excludes are, from man rsync(1):

RCS SCCS CVS CVS.adm RCSLOG cvslog.* tags TAGS .make.state .nse_depinfo *~ #* .#*  ,*  _$*  *$
*.old *.bak *.BAK *.orig *.rej .del-* *.a *.olb *.o *.obj *.so *.exe *.Z *.elc *.ln core 
.svn/ .git/ .hg/ .bzr/

The rule your directory fell afoul of was the core at the end of line 2.

Aintaer

Posted 2013-06-06T21:46:56.770

Reputation: 116

0

Let me delete all and insert as we crossed posted. If you remove the trailing / from myfolder/ the whole directory will be copied. But you will have myfolder inside place. I don't get why -r is not working.

Bung in -vv to get more info.

manselton

Posted 2013-06-06T21:46:56.770

Reputation: 61