scp user@aws-ec2:~/file file
rsync --partial --progress -Pav -e ssh user@aws-ec2:~/file file
scp
只给我 200K/s,但rsync
给我 1.9M/s
我测试了几次,结果都一样。
rsync
使用多个线程??
答案1
答案2
RSYNC 与 SCP
SCP基本上使用 SSH 在本地或通过网络从源到目标进行简单的复制,但您可以使用交换机-C
启用 SSH 压缩,以潜在地加快通过网络复制数据的速度。
同步通过网络连接仅传输两组文件之间的差异,使用高效的校验和搜索算法,在数据传输期间自动优化网络连接。
同步
描述
rsync is a program that behaves in much the same way that rcp does, but has many more options and uses the rsync remote-update protocol to greatly speed up file transfers when the destination file is being updated. The rsync remote-update protocol allows rsync to transfer just the dif- ferences between two sets of files across the network connection, using an efficient checksum-search algorithm described in the technical report that accompanies this package.
SCP
描述
scp copies files between hosts on a network. It uses ssh(1) for data transfer, and uses the same authentication and provides the same secu‐ rity as ssh(1). scp will ask for passwords or passphrases if they are needed for authentication. File names may contain a user and host specification to indicate that the file is to be copied to/from that host. Local file names can be made explicit using absolute or relative pathnames to avoid scp treat‐ ing file names containing ‘:’ as host specifiers. Copies between two remote hosts are also permitted.