2017-05-03

Do you use rsync's "--partial" option?

Let me introduce 1 option of my favorite command rsync(1).
An option "--partial" makes file transferring resumable.
For for daily use, rsync has a handy alias "-P" to "--partial --progress" which shows progress bar. It is useful if you want to execute rsync by yourself (Not usually good for script because progress bar messes up logs).

SRC_HOST="example.com"
SRC_DIR="__PATH_TO_REMOTE_TARGET__"
DST_DIR="__PATH_TO_LOCAL_TARGET__"
CAP_KB="1024"
rsync -avzPn --bwlimit=${CAP_KB} ${SRC_HOST}:${SRC_DIR} ${DST_DIR}

To copy files between 2 hosts via network, my snippet rsync -avzPn --bwlimit=28000 is always ready in launcher.

Linux man page