我正在使用rsync上传/下载一个非常大的文件(20Gb)。 我知道 – 进展选项,但它在我的情况是只是最后显示结果。
我的问题是,在一些不稳定的连接 – 我不知道它是否仍然下载/上传或出了什么问题。 有没有办法显示单个文件的进度条? 类似于wget默认做的事情?
谢谢!
这可能是你以后的事情。
% rsync -avvz --times --stats --checksum --human-readable --acls \ --itemize-changes --progress \ --out-format='[%t] [%i] (Last Modified: %M) (bytes: %-10l) %-100n' \ /usr/include/glib-2.0 my-glib-copy/
交换机的细分如下:
注意:有关上述开关的完整详细信息,请参见rsync
和rsyncd.conf
的手册页。
上面的命令产生下面的logging:
sending incremental file list delta-transmission disabled for local transfer or --whole-file [2012/12/23 21:34:46] [cd+++++++++] (Last Modified: 2010/12/19-08:13:31) (bytes: 4096 ) glib-2.0/ [2012/12/23 21:34:46] [>f+++++++++] (Last Modified: 2010/09/30-15:02:30) (bytes: 1511 ) glib-2.0/glib-object.h 1.51K 100% 0.00kB/s 0:00:00 1.51K 100% 0.00kB/s 0:00:00 (xfer#1, to-check=181/183) [2012/12/23 21:34:46] [>f+++++++++] (Last Modified: 2010/09/30-15:02:30) (bytes: 2910 ) glib-2.0/glib.h 2.91K 100% 2.78MB/s 0:00:00 2.91K 100% 2.78MB/s 0:00:00 (xfer#2, to-check=180/183) [2012/12/23 21:34:46] [>f+++++++++] (Last Modified: 2010/09/30-15:02:31) (bytes: 3613 ) glib-2.0/gmodule.h 3.61K 100% 3.45MB/s 0:00:00 3.61K 100% 3.45MB/s 0:00:00 (xfer#3, to-check=179/183) ... ... [2012/12/23 21:34:46] [>f+++++++++] (Last Modified: 2010/09/30-15:02:31) (bytes: 8431 ) glib-2.0/gobject/gvaluecollector.h 8.43K 100% 141.96kB/s 0:00:00 8.43K 100% 141.96kB/s 0:00:00 (xfer#178, to-check=1/183) [2012/12/23 21:34:46] [>f+++++++++] (Last Modified: 2010/09/30-15:02:31) (bytes: 8507 ) glib-2.0/gobject/gvaluetypes.h 8.51K 100% 143.23kB/s 0:00:00 8.51K 100% 143.23kB/s 0:00:00 (xfer#179, to-check=0/183) total: matches=0 hash_hits=0 false_alarms=0 data=1305506 rsync[2996] (sender) heap statistics: arena: 540672 (bytes from sbrk) ordblks: 3 (chunks not in use) smblks: 7 hblks: 2 (chunks from mmap) hblkhd: 401408 (bytes from mmap) allmem: 942080 (bytes from sbrk + mmap) usmblks: 0 fsmblks: 592 uordblks: 404784 (bytes used) fordblks: 135888 (bytes free) keepcost: 134240 (bytes in releasable chunk) rsync[2999] (server receiver) heap statistics: arena: 286720 (bytes from sbrk) ordblks: 2 (chunks not in use) smblks: 8 hblks: 3 (chunks from mmap) hblkhd: 667648 (bytes from mmap) allmem: 954368 (bytes from sbrk + mmap) usmblks: 0 fsmblks: 672 uordblks: 174480 (bytes used) fordblks: 112240 (bytes free) keepcost: 102352 (bytes in releasable chunk) rsync[2998] (server generator) heap statistics: arena: 233472 (bytes from sbrk) ordblks: 4 (chunks not in use) smblks: 6 hblks: 2 (chunks from mmap) hblkhd: 401408 (bytes from mmap) allmem: 634880 (bytes from sbrk + mmap) usmblks: 0 fsmblks: 448 uordblks: 83152 (bytes used) fordblks: 150320 (bytes free) keepcost: 131120 (bytes in releasable chunk) Number of files: 183 Number of files transferred: 179 Total file size: 1.31M bytes Total transferred file size: 1.31M bytes Literal data: 1.31M bytes Matched data: 0 bytes File list size: 6.30K File list generation time: 0.001 seconds File list transfer time: 0.000 seconds Total bytes sent: 350.39K Total bytes received: 3.43K sent 350.39K bytes received 3.43K bytes 707.64K bytes/sec total size is 1.31M speedup is 3.69
我遇到了这个SF问题:
其中一个答案提到,在较新版本的rsync
,现在支持进度条。 它看起来像这样:
% ./rsync -a --info=progress2 /usr . 305,002,533 80% 65.69MB/s 0:00:01 xfr#1653, ir-chk=1593/3594)
这个进度条仍然不显示传输过程中单个文件的状态,但它显示了整体传输的百分比,这可能会有所帮助。
rsync -vP
适用于我。
从手册页 :“-P相同 – 部分 – 进展”
你是否在守护进程模式下使用rsync? rsync的默认行为(在Debian 6上)就是你所要求的。 但是,我在rsyncd.conf的手册页中发现,守护进程模式下的默认行为是:
转移logging
这个参数使得每个文件的日志logging下载和上传的格式有点类似于ftp守护进程所使用的格式。 守护进程始终logging传输,因此如果传输被中止,日志文件中将不会提及。
如果要自定义日志行,请参阅“日志格式”参数。
因此,如果在守护进程模式下使用rsync,则看起来您必须将“传输日志logging”行添加到rsyncd.conf中。
我认为Pipe Viewer是你需要的: https : //code.google.com/p/pipeviewer/