问题原文
原帖链接 · Cerin · CC BY-SA 3.0
I'm trying to mirror a large Mongo database between from a production server to a dev environment by stopping Mongo on both servers and then running the command:
rsync --archive --delete --recursive --verbose --compress --rsh "ssh -t -o StrictHostKeyChecking=no -i key.pem" remoteuser@remotehost:/var/lib/mongodb/ /var/lib/mongodb
It runs fine for a few minutes, but then stopped with the error:
receiving incremental file list
./
collection-228--5129329295041693519.wt
inflate returned -3 (0 bytes)
rsync error: error in rsync protocol data stream (code 12) at token.c(557) [receiver=3.1.1]
rsync: [generator] write error: Broken pipe (32)
rsync error: error in socket IO (code 10) at io.c(820) [generator=3.1.1]
Googling the error suggests it's some sort of network connection problem, but I'm able to connect to both servers just fine.
If I re-run the command, it fails at the exact same file with the same error message. What's causing this error and how do I fix it?
社区高分解答
原帖链接 · Cerin · CC BY-SA 3.0
It turns out rsync accesses rsync on the remote server, and the versions where not the same between my servers. I was running 3.1.1 on the destination server, but 3.1.0 on the source server, and apparently this was enough to break the download of certain files. I install 3.1.1 on the source server, and afterwards the transfer worked flawlessly.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
