Rsync a directory via a linked name.

Hongyi Zhao
Fri, 17 Apr 2015 00:07:12 -0000

On Thu, 16 Apr 2015 11:21:03 -0400, Kevin Korb wrote:

> Just go 1 deeper for your source: rsync -l
> ftp.cn.debian.org::debian/dists/wheezy/main/installer-amd64/current/

Yes, I've tried this before.  But I also use the `--delete --delete-
excluded' with the above options.  And finally I found that the  current
will not be retrieved, in fact it will be deleted at the end.

Then I noted the following args of rsync:

-L, --copy-links            transform symlink into referent file/dir
-K, --keep-dirlinks         treat symlinked dir on receiver as dir

So I finally use the command like this and it does the trick:

rsync -rlKLPv --delete --delete-excluded \
ftp.cn.debian.org::debian/dists/wheezy/main/installer-amd64/current/

But, even though, I cann't figure out whether the method used by me is
the most appropriate method or not for this case.

Regards
--
.: Hongyi Zhao [ hongyi.zhao AT gmail.com ] Free as in Freedom :.