rsync: The server is configured to refuse --delete 错误的解决方法之一

rsync: The server is configured to refuse --delete 错误的解决方法之一

使用rsync向服务器端传输数据时,如果使用了 --delete 参数,有可能会遇到以下错误

rsync: The server is configured to refuse --delete

rsync error: requested action not supported (code 4) at clientserver.c(685) [receiver=2.6.8]

rsync: read error: Connection reset by peer (104)

rsync error: error in rsync protocol data stream (code 12) at io.c(614) [sender=2.6.8]

出现上面的错误有可能是以下几个原因

(1)在rsync服务器端的配置文件 rsyncd.conf 中添加了 refuse options=delete。

(2)修改配置文件后,没有重启rsync服务器程序

对rsync服务器来说,你修改了它的配置文件,如果不重启rsync服务器程序的话,在某些情况下是可以生效的,而在某些情况下则是无效的。

据我已经试验过的情况:在 rsyncd.conf 中,修改一个block(把以方括号括起来的一段配置称为一个block)中的配置,不需要重启rsync服务器程序,但是如果是公共全局配置参数(即:不在block中,而是在 rsyncd.conf 文件最上方的配置参数),那么就需要重启rsync服务器程序,才能使配置生效。

顺便再记一下rsync的各种返回值的含义:

0 Success

1 Syntax or usage error

2 Protocol incompatibility

3 Errors selecting input/output files, dirs

4 Requested action not supported: an attempt was made to manipulate 64-bit files on a platform that cannot support them; or an option was specified that is supported by the client and not by the server.

5 Error starting client-server protocol

10 Error in socket I/O

11 Error in file I/O

12 Error in rsync protocol data stream

13 Errors with program diagnostics

14 Error in IPC code

20 Received SIGUSR1 or SIGINT

21 Some error returned by waitpid()

22 Error allocating core memory buffers

23 Partial transfer due to error

24 Partial transfer due to vanished source files

30 Timeout in data send/receive

免责声明:本网信息来自于互联网,目的在于传递更多信息,并不代表本网赞同其观点。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,并请自行核实相关内容。本站不承担此类作品侵权行为的直接责任及连带责任。如若本网有任何内容侵犯您的权益,请及时联系我们,本站将会在24小时内处理完毕。
相关文章
返回顶部