用户工具

站点工具


linux:rsync

rsync

rsync is a fast, versatile, remote (and local) file-copying tool.

Usage:

rsync -azcuP /path/to/folderOrFile hostname:/path/to/remoteDir

options explain:

option description
-a, –archive archive mode; equals -rlptgoD (no -H,-A,-X)
-z, –compress compress file data during the transfer
-c, –checksum skip based on checksum, not mod-time & size
-u, –update skip files that are newer on the receiver
-P same as –partial –progress

Another useful options:

option description
–exclude=PATTERN exclude files matching PATTERN
–delete delete extraneous files from destination dirs
-n, –dry-run perform a trial run with no changes made
linux/rsync.txt · 最后更改: 2023/12/03 10:24 由 127.0.0.1