2020-02-05-限速

[root@nfs01 ~]# dd if=/dev/zero of=test1 bs=1M count=128
128+0 records in
128+0 records out
134217728 bytes (134 MB) copied, 2.35655 s, 57.0 MB/s
[root@nfs01 backup]# rsync -avz /backup/ [email protected]::backup --password-file=/etc/rsync.password 
sending incremental file list
./
test1

sent 130659 bytes  received 30 bytes  29042.00 bytes/sec
total size is 134217728  speedup is 1027.00
[root@nfs01 backup]# rsync -avz --bwlimit=10 /backup/ [email protected]::backup --password-file=/etc/rsync.password  
sending incremental file list
./
test1

sent 130659 bytes  received 30 bytes  8431.55 bytes/sec
total size is 134217728  speedup is 1027.00
[root@nfs01 backup]# 

服务端传输中断不显示文件

[root@bakcup backup]# ls -la  #<==客户端已中断
total 8
drwxr-xr-x   2 rsync rsync 4096 Feb  5 13:24 .
dr-xr-xr-x. 25 root  root  4096 Feb  4 18:32 ..
-rw-r--r--   1 rsync rsync    0 Feb  5 02:43 a
-rw-r--r--   1 rsync rsync    0 Feb  5 02:43 b
-rw-r--r--   1 rsync rsync    0 Feb  5 02:43 c
-rw-r--r--   1 rsync rsync    0 Feb  5 02:43 d
-rw-r--r--   1 rsync rsync    0 Feb  5 02:43 e
-rw-r--r--   1 rsync rsync    0 Feb  5 02:43 f
-rw-r--r--   1 rsync rsync    0 Feb  5 02:43 g
[root@bakcup backup]# ls -la
total 16392
drwxr-xr-x   2 rsync rsync     4096 Feb  5 13:25 .
dr-xr-xr-x. 25 root  root      4096 Feb  4 18:32 ..
-rw-r--r--   1 rsync rsync        0 Feb  5 02:43 a
-rw-r--r--   1 rsync rsync        0 Feb  5 02:43 b
-rw-r--r--   1 rsync rsync        0 Feb  5 02:43 c
-rw-r--r--   1 rsync rsync        0 Feb  5 02:43 d
-rw-r--r--   1 rsync rsync        0 Feb  5 02:43 e
-rw-r--r--   1 rsync rsync        0 Feb  5 02:43 f
-rw-r--r--   1 rsync rsync        0 Feb  5 02:43 g
-rw-------   1 rsync rsync 16777216 Feb  5 13:25 .test1.62YIU1#<==客户端推送中
[root@bakcup backup]# ls -la
total 107272
drwxr-xr-x   2 rsync rsync      4096 Feb  5 13:25 .
dr-xr-xr-x. 25 root  root       4096 Feb  4 18:32 ..
-rw-r--r--   1 rsync rsync         0 Feb  5 02:43 a
-rw-r--r--   1 rsync rsync         0 Feb  5 02:43 b
-rw-r--r--   1 rsync rsync         0 Feb  5 02:43 c
-rw-r--r--   1 rsync rsync         0 Feb  5 02:43 d
-rw-r--r--   1 rsync rsync         0 Feb  5 02:43 e
-rw-r--r--   1 rsync rsync         0 Feb  5 02:43 f
-rw-r--r--   1 rsync rsync         0 Feb  5 02:43 g
-rw-------   1 rsync rsync 109838336 Feb  5 13:25 .test1.62YIU1#<==客户端推送中
[root@bakcup backup]# 
[root@bakcup backup]# ls -la
total 131080
drwxr-xr-x   2 rsync rsync      4096 Feb  5 13:00 .
dr-xr-xr-x. 25 root  root       4096 Feb  4 18:32 ..
-rw-r--r--   1 rsync rsync         0 Feb  5 02:43 a
-rw-r--r--   1 rsync rsync         0 Feb  5 02:43 b
-rw-r--r--   1 rsync rsync         0 Feb  5 02:43 c
-rw-r--r--   1 rsync rsync         0 Feb  5 02:43 d
-rw-r--r--   1 rsync rsync         0 Feb  5 02:43 e
-rw-r--r--   1 rsync rsync         0 Feb  5 02:43 f
-rw-r--r--   1 rsync rsync         0 Feb  5 02:43 g
-rw-r--r--   1 rsync rsync 134217728 Feb  5 13:00 test1#<==客户端已完成

你可能感兴趣的:(2020-02-05-限速)