[轉載] 使用rsync 替代scp 實現斷點續傳

 使用rsync 作爲scp 的替代實現斷點續傳

主機A傳送文件夾TestDB到主機B

rsync -rP --rsh=ssh /home/oracle/TestDB/ [email protected]:/home/oracle/TestDB

 

[oracle@rac1-server TestDB]$ rsync -rP --rsh=ssh /home/oracle/TestDB/ [email protected]:/home/oracle/TestDB
sending incremental file list
created directory /home/oracle/TestDB
./
DB1.dbf
     4194304 100%   17.88MB/s    0:00:00 (xfer#1, to-check=7/9)
DB2.dbf
    41959424 100%   13.41MB/s    0:00:02 (xfer#2, to-check=6/9)
DB3.dbf
     8380416 100%    5.57MB/s    0:00:01 (xfer#3, to-check=5/9)
DB4.dbf
    41959424 100%    6.64MB/s    0:00:06 (xfer#4, to-check=4/9)
DB5.dbf
    76021760 100%   12.90MB/s    0:00:05 (xfer#5, to-check=3/9)
DB6.dbf
    80347136  79%    9.76MB/s    0:00:02
--此處斷開了連接
Last login: Tue Jul  1 09:22:34 2014 from 192.168.1.101
[oracle@rac1-server ~]$ rsync -rP --rsh=ssh /home/oracle/TestDB/ [email protected]:/home/oracle/TestDB
sending incremental file list
DB1.dbf
     4194304 100%  102.51MB/s    0:00:00 (xfer#1, to-check=7/9)
DB2.dbf
    41959424 100%   64.44MB/s    0:00:00 (xfer#2, to-check=6/9)
DB3.dbf
     8380416 100%   11.38MB/s    0:00:00 (xfer#3, to-check=5/9)
DB4.dbf
    41959424 100%   37.40MB/s    0:00:01 (xfer#4, to-check=4/9)
DB5.dbf
    76021760 100%   47.14MB/s    0:00:01 (xfer#5, to-check=3/9)
DB6.dbf
   100597760 100%   42.85MB/s    0:00:02 (xfer#6, to-check=2/9)
DB7.dbf
  1005977600 100%   10.95MB/s    0:01:27 (xfer#7, to-check=1/9)
DB8.dbf
   182517760 100%    9.85MB/s    0:00:17 (xfer#8, to-check=0/9)
 
sent 1188790859 bytes  received 248537 bytes  10760537.52 bytes/sec
total size is 1461608448  speedup is 1.23
[oracle@rac1-server ~]$
--實現了斷點續傳

原始連接:

https://www.cnblogs.com/jyzhao/p/3809095.html

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章