BackupPC – 为什么它使用rsync –sender –server …?
我正在CentOS 5.5服务器上试验BackupPC.我已经使用默认值设置了所有内容.
我尝试为主机的/ www目录设置基本备份.备份失败,并出现以下错误: full backup started for directory /www Running: /usr/bin/ssh -q -x -l root target /usr/bin/rsync --server --sender --numeric-ids --perms --owner --group -D --links --hard-links --times --block-size=2048 --recursive --ignore-times . /www/ Xfer PIDs are now 30395 Read EOF: Connection reset by peer Tried again: got 0 bytes Done: 0 files,0 bytes Got fatal error during xfer (Unable to read 4 bytes) Backup aborted (Unable to read 4 bytes) Not saving this as a partial backup since it has fewer files than the prior one (got 0 and 0 files versus 0) 首先,是的,我设置了ssh密钥,允许我在不需要密码的情况下ssh到目标服务器. 在故障排除过程中,我直接从命令行尝试了上面的ssh命令,它就会挂起.看一下SSH的调试消息的结尾,我得到: debug1: Sending subsystem: /usr/bin/rsync --server --sender --numeric-ids --perms --owner --group -D --links --hard-links --times --block-size=2048 --recursive --ignore-times . /www/ Request for subsystem '/usr/bin/rsync --server --sender --numeric-ids --perms --owner --group -D --links --hard-links --times --block-size=2048 --recursive --ignore-times . /www/' failed on channel 0 接下来我开始查看rsync标志.我没认出–server和–sender.看看rsync手册页,果然,我在那里看不到关于–server或–sender的任何内容.那里有什么? 看看BackupPC配置,我有这个: RsyncClientPath = /usr/bin/rsync RsyncClientCmd = $sshPath -q -x -l root $host $rsyncPath $argList+ 对于参数,我列出了以下内容: --numeric-ids --perms --owner --group -D --links --hard-links --times --block-size=2048 --recursive 请注意,没有–server,– sender或–ignore-times.为什么要添加这些东西?这是问题的一部分吗? 解决方法
–server –sender是在管道上运行rsync时使用的选项. rsync服务器是在远程端设置的,因此它可以执行所有校验和和delta编码魔术,这样您只能通过线路传输更改的位.这可能没有在手册页中记录,因为它们是自动添加的,通常不需要知道或关心它们.
从man rsync(1)起
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |