rsync优化

$ rsync -auv -e 'ssh -ax -c blowfish' --timeout=3600 sourcepath targetpath ...

rsync -vzrtpog --progress --delete -e "ssh -p 6000" /root/backup/ root@192.168.0.103:/backup/


–size-only 和ssh -ax -c blowfish

解决死锁:


END

/usr/bin/rsync -vzrutogp --progress --ignore-existing -e 'ssh -ax -c blowfish' --timeout=3600 -a gypsii@192.168.146.22::cfs102 /nfs/gypsii_data/ --password-file=/home/aluo/rsync.pas

/usr/bin/rsync -vzrutogp -size-only --progress --ignore-existing -a gypsii@192.168.146.22::cfs102 /nfs/gypsii_data/ --password-file=/home/aluo/rsync.pas

/usr/bin/rsync -vzrutogp --progress --ignore-existing -ax -c blowfish --timeout=3600 -a gypsii@192.168.146.22::cfs102 /nfs/gypsii_data/ --password-file=/home/aluo/rsync.pas



同步文件数较多的目录出错
有个子目录中文件较多,也就8000来个吧,总是同步一半便退出。在批处理中加上-v参数,看到错误信息如下:
rsync: writefd_unbuffered failed to write 4 bytes to socket [sender]: Connection reset by peer (104)
rsync: read error: Connection reset by peer (104)
rsync error: error in rsync protocol data stream (code 12) at io.c(768) [sender=
3.0.6]

这个问题有点头疼,在www.itefix.no网站论坛上也没能查出个所以然。

不过最终还是在https://www.360docs.net/doc/1117433814.html,上找到解决方案:

在客户端命令行中加上 -no-iconv参数就可以了。

原以为是文件太多,缓冲区不够引起,但看这个解决方案,似乎是转换编码方面的bug了。

在rsync的文档中描述如下:
https://www.360docs.net/doc/1117433814.html,/ftp/rsync/rsync.html



TEMP
/usr/bin/rsync -vzrutogp --progress --ignore-existing -e ssh -ax -c blowfish --timeout=3600 -a gypsii@192.168.146.22::cfs102 /nfs/gypsii_data/ --password-file=/home/aluo/rsync.pas

/usr/bin/rsync -avz --progress -e 'ssh -ax -c blowfish' --timeout=3600 -a gypsii@192.168.146.22:/data /nfs/gypsii_data/ --password-file=/home/aluo/rsync.pas

————————————————————————————————————此条可行
/usr/bin/rsync --no-iconv -vzrtpog --progress -e 'ssh -ax -c blowfish' -a backup@192.168.146.22:/data/ /nfs/gypsii_data/
/usr/bin/rsync --no-iconv -vzrtpog --progress -e 'ssh -p 48022 -ax -c blowfish' -a backup@211.147.65.13:/nfs/gypsii_data/ /backup/
————————————————————————————————————

相关文档
最新文档