sh 通过SSH进行Rsync - (1GB网卡上的40MB / s)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 通过SSH进行Rsync - (1GB网卡上的40MB / s)相关的知识,希望对你有一定的参考价值。

### The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

#### This creates an archive that does the following:

**rsync**
(Everyone seems to like -z, but it is much slower for me)

- a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
- H: preserves hard-links
- A: preserves ACLs
- X: preserves extended attributes
- x: don't cross file-system boundaries
- v: increase verbosity
- --numeric-ds: don't map uid/gid values by user/group name
- --delete: delete extraneous files from dest dirs (differential clean-up during sync)
- --progress: show progress during transfer

**ssh**
- T: turn off pseudo-tty to decrease cpu load on destination.
- o Compression=no: Turn off SSH compression.
- x: turn off X forwarding if it is on by default.

**Original**

```sh
rsync -aHAXxv --numeric-ids -P -e "ssh -T  -o Compression=no -x" user@<source>:<source_dir>/ <dest_dir>/
```


**Flip** 

```sh
rsync -aHAXxv --numeric-ids -P -e "ssh -T -o Compression=no -x" [source_dir/] [dest_host:/dest_dir/]
```
rsync -aHAXxv --numeric-ids -P -e "ssh -T -o Compression=no -x" user@<source>:<source_dir>/ <dest_dir>/

以上是关于sh 通过SSH进行Rsync - (1GB网卡上的40MB / s)的主要内容,如果未能解决你的问题,请参考以下文章

sh 通过ssh备份rsync

sh 通过ssh快速远程目录rsync

sh git-annex rsync ssh synology

通过 ssh 隧道进行 rsync [关闭]

rsync

linux rsync配置出错