这经常是我们所说的镜像同步就是这么来的,如果断点续传呢?rsync完全可以做到这一点。man手册再次告诉我们:

--partial
      By default, rsync will delete any partially  transferred  file  if  the  transfer  is
      interrupted. In some circumstances it is more desirable to keep partially transferred
      files. Using the --partial option tells rsync to keep the partial file  which  should
      make a subsequent transfer of the rest of the file much faster.

--partial-dir=DIR
      A better way to keep partial files than the --partial option is to specify a DIR that
      will be used to hold the partial data (instead of writing it out to  the  destination
      file).   On  the  next  transfer,  rsync will use a file found in this dir as data to
      speed up the resumption of the transfer and then delete it after it  has  served  its
      purpose.

默认的情况下,当rsync传输中断后,新的rsync传输将删除所有的未完成的残余文件片段,然后开始新的传输。而使用--partial后,将会进行我们所说的断点续传。
值得注意的是-P这个参数是综合了--partial --progress两个参数,所以rsync的断点续传可以用下面的例子来说明:

rsync -avzP /tmp/bigfile cnangel@10.1.6.160:/tmp/bigfile

另外,还有两个参数也经常用到:
  t:修改次数
  r:递归方式

rsync断点续传的更多相关文章

  1. Linux文件传输scp和rsync断点续传

    scp 是通过ssh协议传输数据,如果是想传输一个很大的数据,这几天我就遇到过,一个tar包,400G左右,通过scp拷贝时,有可能遇到服务器断电什么的悲剧问题,那么类似scp拷贝的另一个命令 rsy ...

  2. rsync 断点续传

    # rsync -avzP file root@172.20.7.219:/root/tmp           (我这里file指要传送的文件)

  3. Linux rsync实现断点续传

    Linux 主机之间即时传送文件,scp命令大家都很熟悉但当要传送的文件较大,过程中如果网络中断了,就比较悲剧了.这时候可以考虑使用rsync命令替代scp,实现断点续传文件. 试验:rsync使用 ...

  4. rsync 实现断点续传

    Linux 主机之间即时传送文件,scp命令大家都很熟悉但当要传送的文件较大,过程中如果网络中断了,就比较悲剧了.这时候可以考虑使用rsync命令替代scp,实现断点续传文件. 试验:rsync使用 ...

  5. centos linux 系统日常管理4 scp,rsync,md5sum,sha1sum,strace ,find Rsync 常见错误及解决方法 第十七节课

    centos linux 系统日常管理4  scp,rsync,md5sum,sha1sum,strace ,find Rsync 常见错误及解决方法  第十七节课 rsync可以增量同步,scp不行 ...

  6. Linux就这个范儿 第12章 一个网络一个世界

    Linux就这个范儿 第12章 一个网络一个世界 与Linux有缘相识还得从一项开发任务说起.十八年前,我在Nucleus  OS上开发无线网桥AP,需要加入STP生成树协议(SpanningTree ...

  7. rsync的断点续传设置。

    关于rsync的断点续传 关于rsync的断点续传 经常copy大文件,由于服务器.路由等网络的不确定性,老是出现 remote server not responding.于是查了下资料,发现rsy ...

  8. rsync 参数断点续传

    断点续传是使用大写P参数,-P这个参数是综合了--partial --progress两个参数 rsync -avzP /home/hadoop/jdk1..0_73.tar.gz root@10.2 ...

  9. Linux命令学习(2): scp和rsync基本用法与断点续传

    版权声明:本文为博主原创文章,未经允许不得转载. 引子 在平常的工作中,我经常需要在远程服务器和本地之间传输文件. 以前我都使用scp命令,直到今天因为网络中断,scp出现了stalled. 因为上传 ...

随机推荐

  1. 第四步:查看StandardAnalyzer的分词效果并添加停用词

    LUCENE的创建索引有好多种分词方式,这里我们用的StandardAnalyzer分词 package cn.lucene; import java.io.IOException; import o ...

  2. unity3d 场景配置文件生成代码

    using UnityEngine; using UnityEditor; using System.IO; using System; using System.Text; using System ...

  3. thinkphp Auth认证类 比RBAC更好的权限认证方式(Auth类认证)

    thinkphp Auth认证类 比RBAC更好的权限认证方式(Auth类认证)    Auth 类已经在ThinkPHP代码仓库中存在很久了,但是因为一直没有出过它的教程, 很少人知道它, 它其实比 ...

  4. 在java代码中设置margin

    我们平常可以直接在xml里设置margin,如: <ImageView android:layout_margin="5dip" android:src="@dra ...

  5. Java 根据年月日精确计算年龄

    import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; /** * Created b ...

  6. Flex this

    为了便于对比和叙述,我们先上一段最简单的js+html代码:<input type="button" value="test" id="htmB ...

  7. Spring整合Hibernate的时候使用hibernate.cfg.xml

    Spring整合Hibernate其实也就是把Hibernate的SessionFactory对象封装成:org.springframework.orm.hibernate3.LocalSession ...

  8. Java 堆内存模型

    堆内存 Java 中的堆是 JVM 所管理的最大的一块内存空间,主要用于存放各种类的实例对象. 在 Java 中.堆被划分成两个不同的区域:新生代 ( Young ).老年代 ( Old ).新生代 ...

  9. MySQL的id生成策略

    1 自增 CREATE TABLE `test` ( `id` ) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAUL ...

  10. MongoDB系列四:解决secondary的读操作

    http://blog.itpub.net/26812308/viewspace-2124660/ 在Replica sets 中的secondary节点默认是不可读的.使用Replica Sets实 ...