我有rsyncd作为一个Windows服务运行,但是当我尝试访问一个模块并从它同步,我得到我想要的文件,以及我没有 – 因为他们不是位于远程模块结束。 为了testing,我只把一个文件放在备份文件夹中,名为“the_only_file”。 从我的本地机器:
username@local:~$ rsync username@remote::backup . receiving incremental file list file has vanished: "/proc" (in backup) file has vanished: "/cygdrive/c" (in backup) file has vanished: "/cygdrive/d" (in backup) skipping non-regular file "dev/clipboard" skipping non-regular file "dev/conin" skipping non-regular file "dev/conout" skipping non-regular file "dev/console" skipping non-regular file "dev/dsp" skipping non-regular file "dev/full" skipping non-regular file "dev/kmsg" skipping non-regular file "dev/null" skipping non-regular file "dev/ptmx" skipping non-regular file "dev/pty0" skipping non-regular file "dev/random" skipping non-regular file "dev/scd0" skipping non-regular file "dev/sda" skipping non-regular file "dev/sda1" skipping non-regular file "dev/sda2" skipping non-regular file "dev/sr0" skipping non-regular file "dev/tty" skipping non-regular file "dev/urandom" skipping non-regular file "dev/windows" skipping non-regular file "dev/zero" ./ the_only_file cygdrive/ dev/ sent 70 bytes received 613 bytes 455.33 bytes/sec total size is 0 speedup is 0.00 rsync warning: some files vanished before they could be transferred (code 24) at main.c(1708) [generator=3.1.0] username@local:~$ ls cygdrive dev the_only_file
我在cygwin中使用了以下命令来创build服务:
cygrunsrv --install "rsyncd" --path "$(which rsync)" --args "--daemon --no-detach" --desc "Starts rsync daemon to accept rsync connections" --disp "rsync daemon" --type "auto"
而我的rsyncd.conf非常简单:
chroot = yes charset = UTF-8 log file = /var/log/rsyncd.log [backup] uid = username secrets file = /cygdrive/c/cygwin/etc/rsyncd.secrets auth users = username path = /cygdrive/c/Users/username/backup list = false readonly = false dont compress = *.gz *.tgz *.zip *.z *.rpm *.deb *.iso *.bz2 *.tbz *.7z
我能做些什么来使Cygwin的rsyncdperformance得像它应该的? (为什么它会试图发送/ proc目录?太奇怪了…)
我按照我不想做的方式“解决”了这一点:我在rsyncd.conf中添加了以下行:
exclude from = /cygdrive/c/cygwin/etc/rsyncd.exclude
而rsyncd.exclude是:
- /dev/* - /dev - /cygdrive/* - /cygdrive - /proc
现在它按预期工作,警告,这意味着我不能在我的共享根目录中有名为“dev”,“proc”或“cygdrive”的目录/文件。 可能对大多数人无关紧要; 有一个“cygdrive”或者“proc”文件夹会让人感到困惑,但是一个参数可以被设置为devs的文件夹被称为“dev”或类似的东西。 再次,似乎有点小,也许大多数不会在乎。
我通过在/etc/rsyncd.conf添加use chroot = false来解决这个问题。
此页面指定启用此参数将导致您描述的问题。