1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256
| rsync version 3.0.6 protocol version 30 Copyright (C) 1996-2009 by Andrew Tridgell, Wayne Davison, and others. Web site: http://rsync.samba.org/ Capabilities: 64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints, socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace, append, ACLs, xattrs, iconv, symtimes
rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. See the GNU General Public Licence for details.
rsync is a file transfer program capable of efficient remote update via **a fast differencing algorithm**.
Usage: rsync [OPTION]... SRC [SRC]... DEST or rsync [OPTION]... SRC [SRC]... [USER@]HOST:DEST or rsync [OPTION]... SRC [SRC]... [USER@]HOST::DEST or rsync [OPTION]... SRC [SRC]... rsync://[USER@]HOST[:PORT]/DEST or rsync [OPTION]... [USER@]HOST:SRC [DEST] or rsync [OPTION]... [USER@]HOST::SRC [DEST] or rsync [OPTION]... rsync://[USER@]HOST[:PORT]/SRC [DEST] The ':' usages connect via remote shell, while '::' & 'rsync://' usages connect to an rsync daemon, and require SRC or DEST to start with a module name.
Options -v, --verbose increase verbosity 显示详细信息。 -q, --quiet suppress non-error messages --no-motd suppress daemon-mode MOTD (see manpage caveat) 精简输出模式。 -c, --checksum skip based on checksum, not mod-time & size 打开校验开关,强制对文件传输进行校验。 -a, --archive archive mode; equals -rlptgoD (no -H,-A,-X) --no-OPTION turn off an implied OPTION (e.g. --no-D) 归档模式,表示以递归方式传输文件,并保持所有文件属性,等于-rlptgoD。 -r, --recursive recurse into directories 对子目录以递归模式处理。 -R, --relative use relative path names --no-implied-dirs don't send implied dirs with --relative 使用相对路径信息。 -b, --backup make backups (see --suffix & --backup-dir) 创建备份,也就是对于目的已经存在有同样的文件名时,将老的文件重新命名为~filename。可以使用--suffix选项来指定不同的备份文件前缀。 --backup-dir=DIR make backups into hierarchy based in DIR 将备份文件(如~filename)存放在在目录下。 --suffix=SUFFIX set backup suffix (default ~ w/o --backup-dir) 定义备份文件前缀。 -u, --update skip files that are newer on the receiver 仅仅进行更新,也就是跳过所有已经存在于目标设备上更新的文件,只更新目标设备上修改时间晚于源头设备上的文件。 --inplace update destination files in-place (SEE MAN PAGE) 使用替换模式更新目标文件 --append append data onto shorter files 追加数据到文件 --append-verify like --append, but with old data in file checksum 类似于——append,但在文件校验和中使用旧数据 -d, --dirs transfer directories without recursing 不递归地传输目录。 -l, --links copy symlinks as symlinks 在复制文件时保留源文件中的符号链接。如果源文件是符号链接,那么目标文件也将是符号链接。 -L, --copy-links transform symlink into referent file/dir 拷贝文件时,将源文件的符号链接替换为链接所指向的实际文件。这使得目标目录包含的是链接指向的文件,而不是符号链接本身。`-L` 选项可能会导致目标目录中的文件不再是符号链接,而是实际文件的副本。因此,在使用这个选项时需要小心,确保你的需求是将符号链接替换为链接所指向的实际文件。 --copy-unsafe-links only "unsafe" symlinks are transformed --safe-links ignore symlinks that point outside the source tree -k, --copy-dirlinks transform symlink to a dir into referent dir 在文件复制时保留源文件的扩展属性。扩展属性是与文件关联的元数据,提供了额外的信息,例如文件的安全上下文或其他特殊属性。 -K, --keep-dirlinks treat symlinked dir on receiver as dir 会在复制时保留源文件的粘滞位。这可以确保目标目录中的文件继承了源文件的粘滞位。 -H, --hard-links preserve hard links 复制文件时保留源文件的硬链接关系。硬链接是多个文件名指向同一 inode 的情况,而 `rsync -H` 会尝试在目标目录中保留这种关系,以便实现源目录中的硬链接关系。 -p, --perms preserve permissions 会在复制文件时保留源文件的权限(包括所有者、所属组、权限位等)。这确保了目标文件在复制后具有与源文件相同的权限设置。`-p` 选项仅保留基本的权限信息,而不保留特殊的 ACL(Access Control List)等扩展权限。如果需要保留更多的权限信息,可以考虑使用 `-A` 选项。 -E, --executability preserve the file's executability 保留文件的可执行属性。 --chmod=CHMOD affect file and/or directory permissions 影响文件和/或目录的权限 -A, --acls preserve ACLs (implies --perms) 保留 ACLs(访问控制列表),相当于 `--perms`。 -X, --xattrs preserve extended attributes 保留扩展属性。 -o, --owner preserve owner (super-user only) 保留文件所有者(仅超级用户) -g, --group preserve group 保留文件所属组 --devices preserve device files (super-user only) 保留设备文件(仅超级用户) --copy-devices copy device contents as regular file 将设备文件内容作为常规文件复制 --specials preserve special files 保留特殊文件。 -D same as --devices --specials 同 `--devices --specials`。 -t, --times preserve modification times 保留修改时间。 -O, --omit-dir-times omit directories from --times 在 `--times` 时省略目录的修改时间。 --super receiver attempts super-user activities 接收方尝试超级用户操作。 --fake-super store/recover privileged attrs using xattrs 使用扩展属性存储/恢复特权属性。 -S, --sparse handle sparse files efficiently 高效处理稀疏文件。 -n, --dry-run perform a trial run with no changes made 演示运行,不实际进行更改。 -W, --whole-file copy files whole (without delta-xfer algorithm) 整个文件传输(不使用增量传输算法)。 -x, --one-file-system don't cross filesystem boundaries 不跨越文件系统边界。 -B, --block-size=SIZE force a fixed checksum block-size 强制使用固定的校验块大小。 -e, --rsh=COMMAND specify the remote shell to use 指定用于远程操作的Shell命令。 --rsync-path=PROGRAM specify the rsync to run on the remote machine 指定在远程机器上运行的`rsync`程序的路径。 --existing skip creating new files on receiver 跳过在接收方创建新文件。 --ignore-existing skip updating files that already exist on receiver 跳过更新接收方上已存在的文件。 --remove-source-files sender removes synchronized files (non-dirs) 发送方删除已同步的文件(非目录)。 --del an alias for --delete-during `--delete-during`的别名。 --delete delete extraneous files from destination dirs 从目标目录中删除多余的文件。 --delete-before receiver deletes before transfer, not during 接收方在传输之前删除文件,而不是在传输过程中。 --delete-during receiver deletes during transfer (default) 接收方在传输过程中删除文件(默认)。 --delete-delay find deletions during, delete after 查找删除项,传输完成后再删除。 --delete-after receiver deletes after transfer, not during 接收方在传输后而不是在传输过程中删除文件。 --delete-excluded also delete excluded files from destination dirs 从目标目录中删除被排除的文件。 --ignore-errors delete even if there are I/O errors 即使有I/O错误也继续删除。 --force force deletion of directories even if not empty 强制删除目录,即使它们不为空。 --max-delete=NUM don't delete more than NUM files 不要删除超过指定数量的文件。 --max-size=SIZE don't transfer any file larger than SIZE 不传输大于指定大小的文件。 --min-size=SIZE don't transfer any file smaller than SIZE 不传输小于指定大小的文件。 --partial keep partially transferred files 保留部分传输的文件 --partial-dir=DIR put a partially transferred file into DIR 将部分传输的文件放入指定目录。 --delay-updates put all updated files into place at transfer's end 在传输结束时将所有更新的文件放置到目标位置。 -m, --prune-empty-dirs prune empty directory chains from the file-list 从文件列表中删除空目录链。 --numeric-ids don't map uid/gid values by user/group name 不通过用户名/组名映射`uid/gid`值。 --timeout=SECONDS set I/O timeout in seconds 设置I/O超时时间(秒)。 --contimeout=SECONDS set daemon connection timeout in seconds 设置守护进程连接超时时间(秒)。 -I, --ignore-times don't skip files that match in size and mod-time 不跳过大小和修改时间匹配的文件。 --size-only skip files that match in size 只跳过大小匹配的文件。 --modify-window=NUM compare mod-times with reduced accuracy 以较低的准确性比较修改时间。 -T, --temp-dir=DIR create temporary files in directory DIR 在目录DIR中创建临时文件。 -y, --fuzzy find similar file for basis if no dest file 如果没有目标文件,则寻找相似的基准文件。 --compare-dest=DIR also compare destination files relative to DIR 相对于指定的目录`DIR`,在传输源文件时与目标目录进行比较。具体来说,`rsync`会首先检查源文件是否与`DIR`中的文件匹配,如果匹配,则`rsync`会将该文件的内容复制到目标目录,但不会在目标目录中创建新文件。 --copy-dest=DIR ... and include copies of unchanged files 包括未更改的文件的副本。 --link-dest=DIR hardlink to files in DIR when unchanged 在未更改时硬链接到DIR中的文件。 -z, --compress compress file data during the transfer 在传输过程中压缩文件数据。 --compress-level=NUM explicitly set compression level 明确设置压缩级别。 --skip-compress=LIST skip compressing files with a suffix in LIST 跳过在LIST中具有后缀的文件的压缩。 -C, --cvs-exclude auto-ignore files the same way CVS does 自动忽略文件,就像CVS一样。 -f, --filter=RULE add a file-filtering RULE 添加文件过滤规则。 -F same as --filter='dir-merge /.rsync-filter' repeated: --filter='- .rsync-filter' 同 `--filter='dir-merge /.rsync-filter'`,即 `--filter='- .rsync-filter'`。 --exclude=PATTERN exclude files matching PATTERN 排除与PATTERN匹配的文件。 --exclude-from=FILE read exclude patterns from FILE 从FILE中读取排除模式。 --include=PATTERN don't exclude files matching PATTERN 不排除与PATTERN匹配的文件。 --include-from=FILE read include patterns from FILE 从FILE中读取包含模式。 --files-from=FILE read list of source-file names from FILE 从FILE中读取源文件名列表。 -0, --from0 all *-from/filter files are delimited by 0s 所有*-from/filter文件以0分隔。 -s, --protect-args no space-splitting; only wildcard special-chars 不拆分参数中的空格;仅保留通配符特殊字符。 --address=ADDRESS bind address for outgoing socket to daemon 绑定传出套接字到守护程序的地址。 --port=PORT specify double-colon alternate port number 指定双冒号的备用端口号。 --sockopts=OPTIONS specify custom TCP options 指定自定义TCP选项。 --blocking-io use blocking I/O for the remote shell 为远程Shell使用阻塞I/O。 --stats give some file-transfer stats 提供一些文件传输统计信息。 -8, --8-bit-output leave high-bit chars unescaped in output 在输出中保留高位字符而不进行转义。 -h, --human-readable output numbers in a human-readable format 以人类可读的格式输出数字。 --progress show progress during transfer 在传输过程中显示进度。 -P same as --partial --progress 同 `--partial --progress`。 -i, --itemize-changes output a change-summary for all updates 输出所有更新的变更摘要。 --out-format=FORMAT output updates using the specified FORMAT 使用指定的FORMAT输出更新。 --log-file=FILE log what we're doing to the specified FILE 将我们的操作记录到指定的FILE中。 --log-file-format=FMT log updates using the specified FMT 使用指定的FMT记录更新。 --password-file=FILE read daemon-access password from FILE 从FILE中读取守护进程访问密码。 --list-only list the files instead of copying them 列出文件而不是复制它们。 --bwlimit=KBPS limit I/O bandwidth; KBytes per second 限制I/O带宽;每秒KB字节。 --write-batch=FILE write a batched update to FILE 将批量更新写入FILE。 --only-write-batch=FILE like --write-batch but w/o updating destination 类似于 `--write-batch`,但不更新目标。 --read-batch=FILE read a batched update from FILE 从FILE中读取批量更新。 --protocol=NUM force an older protocol version to be used 强制使用较旧的协议版本。 --iconv=CONVERT_SPEC request charset conversion of filenames 请求文件名的字符集转换。 -4, --ipv4 prefer IPv4 优先使用IPv4。 -6, --ipv6 prefer IPv6 优先使用IPv6。 --version print version number 打印版本号。 (-h) --help show this help (-h works with no other options) 显示帮助信息(-h在无其他选项的情况下也起作用)。
Use "rsync --daemon --help" to see the daemon-mode command-line options. 显示有关`rsync`守护进程模式的命令行选项和帮助信息,以便用户了解如何配置和运行`rsync`作为守护进程。 Please see the rsync(1) and rsyncd.conf(5) man pages for full documentation. See http://rsync.samba.org/ for updates, bug reports, and answers
|