rsync网络不稳定情况下的大文件传输



rsync网络不稳定情况下的大文件传输


由于本人供职的公司提供单机游戏的下载,而单机游戏一般都较大,我们使用了rsync把本地服务器(本地仓库)同步到外国服务器(国外仓库)最后再同步到国外的web前端服务器。
然而总是有某些原因导致外国的有些服务器网络不稳定,再加上同步的文件都较大(30多G的也经常有)。当我们使用rsync -avzP这个命令也会有卡死的时候,那么不妨使用下面的三个参数。
分别为:--inplace  , --append  ,--append-verify 。具体选哪一个根据实际情况吧。



--inplace
              This option changes how rsync transfers a file when its data needs to be updated: instead of the default method of creating a new copy of the file and moving it into place when it is com‐
              plete, rsync instead writes the updated data directly to the destination file.


              This has several effects:


              o      Hard links are not broken.  This means the new data will be visible through other hard links to the destination file.  Moreover, attempts to copy differing source files onto a mul‐
                     tiply-linked destination file will result in a "tug of war" with the destination data changing back and forth.


              o      In-use binaries cannot be updated (either the OS will prevent this from happening, or binaries that attempt to swap-in their data will misbehave or crash).


              o      The file’s data will be in an inconsistent state during the transfer and will be left that way if the transfer is interrupted or if an update fails.


              o      A file that rsync cannot write to cannot be updated. While a super user can update any file, a normal user needs to be granted write permission for the open of the file for writing
                     to be successful.


              o      The efficiency of rsync’s delta-transfer algorithm may be reduced if some data in the destination file is overwritten before it can be copied to a position later in the file.  This
                     does not apply if you use --backup, since rsync is smart enough to use the backup file as the basis file for the transfer.


              WARNING: you should not use this option to update files that are being accessed by others,
  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值