X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/fc7952e7f3e3e3a6ee001bb44c25a43b9f6f0055..a1b1b1da46bdc8b36cc821b3839adc13656de70b:/rsync.yo diff --git a/rsync.yo b/rsync.yo index 15f888a3..2b05f95c 100644 --- a/rsync.yo +++ b/rsync.yo @@ -223,7 +223,7 @@ verb( -r, --recursive recurse into directories -R, --relative use relative path names -b, --backup make backups (default ~ suffix) - --backup-dir=DIR put backups in the specified directory + --backup-dir make backups into this directory --suffix=SUFFIX override backup suffix -u, --update update only (don't overwrite newer files) -l, --links preserve soft links @@ -248,6 +248,7 @@ verb( --delete delete files that don't exist on the sending side --delete-excluded also delete excluded files on the receiving side --delete-after delete after transferring, not before + --ignore-errors delete even if there are IO errors --max-delete=NUM don't delete more than NUM files --partial keep partially transferred files --force force deletion of directories even if not empty @@ -255,6 +256,7 @@ verb( --timeout=TIME set IO timeout in seconds -I, --ignore-times don't exclude files that match length and time --size-only only use file size when determining if a file should be transferred + --modify-window=NUM Timestamp window (seconds) for file match (default=0) -T --temp-dir=DIR create temporary files in directory DIR --compare-dest=DIR also compare destination files relative to DIR -P equivalent to --partial --progress @@ -268,10 +270,12 @@ verb( --address bind to the specified address --config=FILE specify alternate rsyncd.conf file --port=PORT specify alternate rsyncd port number + --blocking-io use blocking IO for the remote shell --stats give some file transfer stats --progress show progress during transfer --log-format=FORMAT log file transfers using specified format --password-file=FILE get password from FILE + --bwlimit=KBPS limit I/O bandwidth, KBytes per second -h, --help show this help screen ) @@ -313,6 +317,13 @@ regardless of timestamp. This is useful when starting to use rsync after using another mirroring system which may not preserve timestamps exactly. +dit(bf(--modify-window)) When comparing two timestamps rsync treats +the timestamps as being equal if they are within the value of +modify_window. This is normally zero, but you may find it useful to +set this to a larger value in some situations. In particular, when +transferring to/from FAT filesystems which cannot represent times with +a 1 second resolution this option is useful. + dit(bf(-c, --checksum)) This forces the sender to checksum all files using a 128-bit MD4 checksum before transfer. The checksum is then explicitly checked on the receiver and any files of the same name @@ -494,9 +505,9 @@ See the section on exclude patterns for information on the syntax of this option. dit(bf(--exclude-from=FILE)) This option is similar to the --exclude -option, but instead it adds all filenames listed in the file FILE to -the exclude list. Blank lines in FILE and lines starting with ';' or '#' -are ignored. +option, but instead it adds all exclude patterns listed in the file +FILE to the exclude list. Blank lines in FILE and lines starting with +';' or '#' are ignored. dit(bf(--include=PATTERN)) This option tells rsync to not exclude the specified pattern of filenames. This is useful as it allows you to @@ -609,6 +620,11 @@ specified. dit(bf(--port=PORT)) This specifies an alternate TCP port number to use rather than the default port 873. +dit(bf(--blocking-io)) This specifies whether rsync will use blocking +IO when launching a remote shell transport. You may find this is +needed for some remote shells that can't handle the default +non-blocking IO. + dit(bf(--log-format=FORMAT)) This allows you to specify exactly what the rsync client logs to stdout on a per-file basis. The log format is specified using the same format conventions as the log format option in @@ -642,6 +658,14 @@ transport, not when using a remote shell as the transport. The file must not be world readable. It should contain just the password as a single line. +dit(bf(--bwlimit=KBPS)) This option allows you to specify a maximum +transfer rate in kilobytes per second. This option is most effective when +using rsync with large files (several megabytes and up). Due to the nature +of rsync transfers, blocks of data are sent, then if rsync determines the +transfer was too fast, it will wait before sending the next data block. The +result is an average transfer rate equalling the specified limit. A value +of zero specifies no limit. + enddit() manpagesection(EXCLUDE PATTERNS) @@ -657,7 +681,11 @@ skipped. If it is an include pattern then that filename is not skipped. If no matching include/exclude pattern is found then the filename is not skipped. -Note that the --include and --exclude options take one pattern +Note that when used with -r (which is implied by -a), every subcomponent of +every path is visited from top down, so include/exclude patterns get +applied recursively to each subcomponent. + +Note also that the --include and --exclude options take one pattern each. To add multiple patterns use the --include-from and --exclude-from options or multiple --include and --exclude options. @@ -666,9 +694,11 @@ The patterns can take several forms. The rules are: itemize( it() if the pattern starts with a / then it is matched against the start of the filename, otherwise it is matched against the end of - the filename. Thus /foo would match a file called foo - at the base of the tree whereas foo would match any file - called foo anywhere in the tree. + the filename. Thus "/foo" would match a file called "foo" at the base of + the tree. On the other hand, "foo" would match any file called "foo" + anywhere in the tree because the algorithm is applied recursively from + top down; it behaves as if each path component gets a turn at being the + end of the file name. it() if the pattern ends with a / then it will only match a directory, not a file, link or device. @@ -677,12 +707,15 @@ itemize( *?[ then expression matching is applied using the shell filename matching rules. Otherwise a simple string match is used. + it() if the pattern includes a double asterisk "**" then all wildcards in + the pattern will match slashes, otherwise they will stop at slashes. + it() if the pattern contains a / (not counting a trailing /) then it is matched against the full filename, including any leading directory. If the pattern doesn't contain a / then it is matched - only against the final component of the filename. Furthermore, if - the pattern includes a double asterisk "**" then all wildcards in - the pattern will match slashes, otherwise they will stop at slashes. + only against the final component of the filename. Again, remember + that the algorithm is applied recursively so "full filename" can + actually be any portion of a path. it() if the pattern starts with "+ " (a plus followed by a space) then it is always considered an include pattern, even if specified as @@ -699,7 +732,14 @@ itemize( The +/- rules are most useful in exclude lists, allowing you to have a single exclude list that contains both include and exclude options. -Here are some examples: +If you end an exclude list with --exclude '*', note that since the +algorithm is applied recursively that unless you explicitly include +parent directories of files you want to include then the algorithm +will stop at the parent directories and never see the files below +them. To include all directories, use --include '*/' before the +--exclude '*'. + +Here are some exclude/include examples: itemize( it() --exclude "*.o" would exclude all filenames matching *.o @@ -739,6 +779,10 @@ it. The most common cause is incorrectly configured shell startup scripts (such as .cshrc or .profile) that contain output statements for non-interactive logins. +If you are having trouble debugging include and exclude patterns, then +try specifying the -vv option. At this level of verbosity rsync will +show why each individual file is included or excluded. + manpagesection(ENVIRONMENT VARIABLES) startdit()