[转载] 使用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

 

你可能感兴趣的:(linux,软件使用)