rsync, network shares, and soft links

Ryan Johnson ryanjohn@ece.cmu.edu
Thu May 26 22:16:00 GMT 2011


Hi all,

I'm using rsync to make backups of my laptop to a windows share, and 
with the -l option it copies over links, but apparently does so as 
linux-style rather than cygwin-style.

When I do it to a local dir, the link is recognized as such and not re-sent:
> $ cd test; ln -s ../apps; ll; cd ..
> total 1.0K
> lrwxrwxrwx 1 Ryan None 7 May 26 18:04 apps -> ../apps/
>
> $ rsync -vrlpt test/ test-backup/
> sending incremental file list
> created directory test-backup
> ./
> apps -> ../apps
>
> $ rsync -vrlpt test/ test-backup/
> sending incremental file list
>
> $ ll test-backup/
> total 1.0K
> lrwxrwxrwx 1 Ryan None 7 May 26 18:04 apps -> ../apps/

However, if I target a SMB share instead, the cygwin link becomes a 
linux link (which never matches and is always re-sent, and which means 
nothing to cygwin when restored):
> $ rsync -vrlpt test/ /cygdrive/z/laptop-backup/test-backup/
> sending incremental file list
> created directory /cygdrive/z/laptop-backup/test-backup
> ./
> apps -> ../apps
>
> $ rsync -vrlpt test/ /cygdrive/z/laptop-backup/test-backup/
> sending incremental file list
> apps -> ../apps
>
> $ ll !$
> ll /cygdrive/z/laptop-backup/test-backup/
> total 1.0M
> -rw-r--r-- 1 ???????? ???????? 28 May 26 18:04 apps
>
> $ rsync -vrlpt /cygdrive/z/laptop-backup/test-backup/ test-restore/
> sending incremental file list
> created directory test-restore
> ./
> apps
>
> $ ll test-restore/apps
> -rw-r--r-- 1 Ryan None 28 May 26 18:04 test-restore/apps
>
> $ cat !$
> cat test-restore/apps
> !<symlink>â–’â–’../apps

Is this a known limitation of cygwin's rsync and SMB or is there 
something I could have done differently?

Thanks!
Ryan


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list