rsync

rsync

Arguments

  • -a : archive mode, recursive, sync content and every meta info
  • -z : compress in transfer
  • -v : verbose
  • -h : human readable output

Examples

# 同步本地2个文件夹 /src => /dst/src
rsync -avzh /src /dst

# sync in background
nohup rsync -azv /src /dst &

# 同步 local => remote ssh server, 指定 ssh 2222 服务器端口, 显示进度
rsync -avz -e 'ssh -p 2222' --progress ./dir user@host:/path

Last update: 2021-07-05 02:29:52 UTC