Ubuntu和FreeBSD之间的rsync
我正在尝试在我家的Ubuntu 14.04 i686服务器(备份存储)和被监禁的FreeBSD 10.3-PRERELEASE#5 amd64(web服务器)之间同步文件 我使用以下命令(真正的IP肯定是另一个): 我得到以下错误:Ubuntu和FreeBSD之间的rsync,ubuntu,ubuntu-14.04,rsync,freebsd,Ubuntu,Ubuntu 14.04,Rsync,Freebsd,我正在尝试在我家的Ubuntu 14.04 i686服务器(备份存储)和被监禁的FreeBSD 10.3-PRERELEASE#5 amd64(web服务器)之间同步文件 我使用以下命令(真正的IP肯定是另一个): 我得到以下错误: Password for user@example.com: receiving file list ... Connection to 8.8.8.8 closed by remote host. rsync: connection unexpectedly cl
Password for user@example.com:
receiving file list ... Connection to 8.8.8.8 closed by remote host.
rsync: connection unexpectedly closed (16384 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at io.c(226) [Receiver=3.1.1]
同时,scp工作正常:
$ scp -P 2222 user@8.8.8.8:/hosting/my.site/index.php /backup/my.site/
Password for user@example.com:
index.php
$ ls /backup/my.site/index.php
-rw-r--r-- 1 user user 418 Jan 25 17:00 /backup/my.site/index.php
如果我尝试在FreeBSD上做同样的事情,我会得到以下结果
rsync -uvrhtl user@home.com:/backup/my.site ~/tmp/
user@home.com's password:
receiving incremental file list
created directory /home/user/tmp
./
site-folders-and-files/
...
...
...
site-folders-and-files/folders/folders/README
Write failed: Permission denied
rsync: connection unexpectedly closed (58914 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [receiver=3.1.1]
rsync: connection unexpectedly closed (67040 bytes received so far) [generator]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [generator=3.1.1]
rsync版本如下。FreeBSD:
user@freebsd % rsync --version
rsync version 3.1.1 protocol version 31
Copyright (C) 1996-2014 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
64-bit files, 32-bit inums, 64-bit timestamps, 64-bit long ints,
socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
append, ACLs, xattrs, no iconv, symtimes, no prealloc, file-flags
rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you
are welcome to redistribute it under certain conditions. See the GNU
General Public Licence for details.
和Ubuntu:
user@ubuntu$ rsync --version
rsync version 3.1.1 protocol version 31
Copyright (C) 1996-2014 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
64-bit files, 64-bit inums, 32-bit timestamps, 64-bit long ints,
socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
append, ACLs, xattrs, iconv, symtimes, prealloc
rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you
are welcome to redistribute it under certain conditions. See the GNU
General Public Licence for details.
谢谢你的建议。解决了。原因是FreeBSD监狱配置。采取了哪些措施来解决问题:
- 在主机FreeBSD机器上:在
set中/etc/sysctl.conf
net.inet.tcp.tso=0
- 入狱:在
add/etc/ssh/sshd_config
UsePAM yes
- 然后更新监狱中的所有内容,使其与主机FreeBSD上的版本相同
- 在主机FreeBSD机器上:在
set中/etc/sysctl.conf
net.inet.tcp.tso=0
- 入狱:在
add/etc/ssh/sshd_config
UsePAM yes
- 然后更新监狱中的所有内容,使其与主机FreeBSD上的版本相同
- 已解决。原因是FreeBSD监狱配置。采取了哪些措施来解决问题:
user@ubuntu$ rsync --version
rsync version 3.1.1 protocol version 31
Copyright (C) 1996-2014 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
64-bit files, 64-bit inums, 32-bit timestamps, 64-bit long ints,
socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
append, ACLs, xattrs, iconv, symtimes, prealloc
rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you
are welcome to redistribute it under certain conditions. See the GNU
General Public Licence for details.