复制到本地文件系统时,我总是使用以下rsync选项:
# rsync -avhW --no-compress --progress /src/ /dst/
这是我的理由:
-a is for archive, which preserves ownership, permissions etc.
-v is for verbose, so I can see what's happening (optional)
-h is for human-readable, so the transfer rate and file sizes are easier to read (optional)
-W is for copying whole files only, without delta-xfer algorithm which should reduce CPU load
--no-compress as there's no lack of bandwidth between local devices
--progress so I can see the progress of large files (optional)
我已经看到使用以上rsync设置比以下tar命令将传输速度提高了17%,这是另一个答案所建议的:
# (cd /src; tar cf - .) | (cd /dst; tar xpf -)