我本周末升级到 Ubuntu 15.04。现在,rsync 不会再好用了:
当我尝试运行它时:
beheer@boson:~ $ rsync -Wvvqaz --log-file=rs.txt --delete-excluded --delete --no-g --password-file=/home/beheer/rsync.local.pwd --exclude=lost+found /home rsync://boson.local/boson-backup/boson/
Run Code Online (Sandbox Code Playgroud)
我得到:
rsync: failed to connect to boson.local (10.0.1.220): Connection refused (111)
rsync error: error in socket IO (code 10) at clientserver.c(128) [sender=3.1.1]
Run Code Online (Sandbox Code Playgroud)
日志文件包含:
2015/05/25 19:00:54 [15163] opening tcp connection to boson.local port 873
2015/05/25 19:00:54 [15163] rsync: failed to connect to boson.local (10.0.1.220): Connection refused (111)
2015/05/25 19:00:54 [15163] rsync error: error in socket IO (code 10) at clientserver.c(128) [sender=3.1.1]
Run Code Online (Sandbox Code Playgroud)
这是对本地备份的尝试。但是,尝试从外部(Debian)服务器执行类似操作会返回完全相同的错误。
$ systemctl |grep ufw
ufw.service loaded active exited Uncomplicated firewall
$ sudo ufw status
Status: inactive
$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Run Code Online (Sandbox Code Playgroud)
任何建议我还可以检查什么或可能有什么问题?
编辑:按照下面的评论中的建议通过 ssh 使用 rsync 会产生相同的错误。
EDIT2:更新防火墙 ( ufw) 状态和添加iptables状态。
EDIT3:不应该有一个rsyncd守护进程在运行吗?
$ ps aux |grep rsync
beheer 8559 0.0 0.0 9492 2176 pts/0 S+ 10:23 0:00 grep --color=auto rsync
Run Code Online (Sandbox Code Playgroud)
systemctl也不显示任何rsync服务。谷歌上没有提到这是必要的或如何创建它。
rsync.service 已安装。你只需要看起来非常努力。;-)
$ systemctl list-unit-files |grep rsync
rsync.service disabled
Run Code Online (Sandbox Code Playgroud)
由于默认情况下该服务是禁用的 (...),您需要启用它然后启动它。
$ sudo systemctl enable rsync.service
Synchronizing state for rsync.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d rsync defaults
Executing /usr/sbin/update-rc.d rsync enable
$ sudo systemctl start rsync.service
Run Code Online (Sandbox Code Playgroud)
然后你去:
$ systemctl |grep rsync
rsync.service loaded active running fast remote file copy program daemon
Run Code Online (Sandbox Code Playgroud)
这在重新启动后仍然存在。因此无需在每次启动后手动启动服务。
| 归档时间: |
|
| 查看次数: |
20566 次 |
| 最近记录: |