X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/40aaa571b4b16f62438f5df05295f965fbea4dc8..4c72f27dd90c8a028f67305aa01c822a07aae484:/rsync.yo diff --git a/rsync.yo b/rsync.yo index 90065dfe..8e2e4b7c 100644 --- a/rsync.yo +++ b/rsync.yo @@ -321,6 +321,7 @@ to the detailed description below for a complete description. verb( -D, --devices preserve devices (root only) -t, --times preserve times -O, --omit-dir-times omit directories when preserving times + --chmod=CHMOD change destination permissions -S, --sparse handle sparse files efficiently -n, --dry-run show what would have been transferred -W, --whole-file copy files whole (without rsync algorithm) @@ -356,6 +357,7 @@ to the detailed description below for a complete description. verb( --copy-dest=DIR ... and include copies of unchanged files --link-dest=DIR hardlink to files in DIR when unchanged -z, --compress compress file data during the transfer + --compress-level=NUM explicitly set compression level -C, --cvs-exclude auto-ignore files in the same way CVS does -f, --filter=RULE add a file-filtering RULE -F same as --filter='dir-merge /.rsync-filter' @@ -370,6 +372,8 @@ to the detailed description below for a complete description. verb( --port=PORT specify double-colon alternate port number --blocking-io use blocking I/O for the remote shell --stats give some file-transfer stats + -h, --human-readable output numbers in a human-readable format + --si like human-readable, but use powers of 1000 --progress show progress during transfer -P same as --partial --progress -i, --itemize-changes output a change-summary for all updates @@ -385,7 +389,7 @@ to the detailed description below for a complete description. verb( -4, --ipv4 prefer IPv4 -6, --ipv6 prefer IPv6 --version print version number - -h, --help show this help screen) + --help show this help screen) Rsync can also be run as a daemon, in which case the following options are accepted: verb( @@ -398,7 +402,7 @@ accepted: verb( -v, --verbose increase verbosity -4, --ipv4 prefer IPv4 -6, --ipv6 prefer IPv6 - -h, --help show this help screen) + --help show this help screen) manpageoptions() @@ -409,8 +413,10 @@ The '=' for options that take a parameter is optional; whitespace can be used instead. startdit() -dit(bf(-h, --help)) Print a short help page describing the options -available in rsync. +dit(bf(--help)) Print a short help page describing the options +available in rsync and exit. For backward-compatibility with older +versions of rsync, the same help output can also be requested by using +the bf(-h) option without any other args. dit(bf(--version)) print the rsync version number and exit. @@ -546,8 +552,17 @@ dit(bf(-b, --backup)) With this option, preexisting destination files are renamed as each file is transferred or deleted. You can control where the backup file goes and what (if any) suffix gets appended using the bf(--backup-dir) and bf(--suffix) options. -Note that if you don't specify bf(--backup-dir), the bf(--omit-dir-times) -option will be enabled. + +Note that if you don't specify bf(--backup-dir), (1) the +bf(--omit-dir-times) option will be implied, and (2) if bf(--delete) is +also in effect (without bf(--delete-excluded)), rsync will add a protect +filter-rule for the backup suffix to the end of all your existing excludes +(e.g. -f "P *~"). This will prevent previously backed-up files from being +deleted. Note that if you are supplying your own filter rules, you may +need to manually insert your own exclude/protect rule somewhere higher up +in the list so that it has a high enough priority to be effective (e.g., if +your rules specify a trailing inclusion/exclusion of '*', the auto-added +rule would never be reached). dit(bf(--backup-dir=DIR)) In combination with the bf(--backup) option, this tells rsync to store all backups in the specified directory. This is @@ -696,6 +711,14 @@ it is preserving modification times (see bf(--times)). If NFS is sharing the directories on the receiving side, it is a good idea to use bf(-O). This option is inferred if you use bf(--backup) without bf(--backup-dir). +dit(bf(--chmod)) This options tells rsync to apply the listed "chmod" pattern +to the permission of the files on the destination. In addition to the normal +parsing rules specified in the chmod manpage, you can specify an item that +should only apply to a directory by prefixing it with a 'D', or specify an +item that should only apply to a file by prefixing it with a 'F'. For example: + +quote(--chmod=Dg+s,ug+w,Fo-w,+X) + dit(bf(-n, --dry-run)) This tells rsync to not do any file transfers, instead it will just report the actions it would have taken. @@ -806,14 +829,15 @@ file that is larger than the specified SIZE. The SIZE value can be suffixed with a string to indicate a size multiplier, and may be a fractional value (e.g. "bf(--max-size=1.5m)"). -The suffixes are as follows: "K" (or "k") is a kilobyte (1024), -"M" (or "m") is a megabyte (1024*1024), and "G" (or "g") is a -gigabyte (1024*1024*1024). -If you want the multiplier to be 1000 instead of 1024, suffix the K, G, or -M with a "T" (or "t") to indicate that a power of 10 is desired. +The suffixes are as follows: "K" (or "KiB") is a kibibyte (1024), +"M" (or "MiB") is a mebibyte (1024*1024), and "G" (or "GiB") is a +gibibyte (1024*1024*1024). +If you want the multiplier to be 1000 instead of 1024, use "KB", +"MB", or "GB". (Note: lower-case is also accepted for all values.) Finally, if the suffix ends in either "+1" or "-1", the value will be offset by one byte in the indicated direction. -Examples: --max-size=1.5mt-1 is 1499999 bytes, and --max-size=2g+1 is + +Examples: --max-size=1.5mb-1 is 1499999 bytes, and --max-size=2g+1 is 2147483649 bytes. dit(bf(--min-size=SIZE)) This tells rsync to avoid transferring any @@ -838,9 +862,18 @@ running rsync daemon on the remote host. See the section "USING RSYNC-DAEMON FEATURES VIA A REMOTE-SHELL CONNECTION" above. Command-line arguments are permitted in COMMAND provided that COMMAND is -presented to rsync as a single argument. For example: +presented to rsync as a single argument. You must use spaces (not tabs +or other whitespace) to separate the command and args from each other, +and you can use single- and/or double-quotes to preserve spaces in an +argument (but not backslashes). Note that doubling a single-quote +inside a single-quoted string gives you a single-quote; likewise for +double-quotes (though you need to pay attention to which quotes your +shell is parsing and which quotes rsync is parsing). Some examples: -quote(tt( -e "ssh -p 2234")) +quote( +tt( -e 'ssh -p 2234')nl() +tt( -e 'ssh -o "ProxyCommand nohup ssh firewall nc -w1 %h %p"')nl() +) (Note that ssh users can alternately customize site-specific connect options in their .ssh/config file.) @@ -1083,6 +1116,10 @@ be achieved by using a compressing remote shell or a compressing transport because it takes advantage of the implicit information in the matching data blocks that are not explicitly sent over the connection. +dit(bf(--compress-level=NUM)) Explicitly set the compression level to use +(see bf(--compress)) instead of letting it default. If NUM is non-zero, +the bf(--compress) option is implied. + dit(bf(--numeric-ids)) With this option rsync will transfer numeric group and user IDs rather than using user and group names and mapping them at both ends. @@ -1212,6 +1249,13 @@ dit(bf(--stats)) This tells rsync to print a verbose set of statistics on the file transfer, allowing you to tell how effective the rsync algorithm is for your data. +dit(bf(-h, --human-readable)) Output numbers in a more human-readable format. +Large numbers may be output in larger units, with a K (1024), M (1024*1024), +or G (1024*1024*1024) suffix. + +dit(bf(--si)) Similar to the bf(--human-readable) option, but using powers +of 1000 instead of 1024. + dit(bf(--partial)) By default, rsync will delete any partially transferred file if the transfer is interrupted. In some circumstances it is more desirable to keep partially transferred files. Using the @@ -1241,10 +1285,10 @@ will prevent partial-dir files from being transferred and also prevent the untimely deletion of partial-dir items on the receiving side. An example: the above bf(--partial-dir) option would add an "bf(--exclude=.rsync-partial/)" rule at the end of any other filter rules. Note that if you are -supplying your own filter rules, you may need to manually insert a -rule for this directory exclusion somewhere higher up in the list so that +supplying your own exclude rules, you may need to manually insert your own +exclude/protect rule somewhere higher up in the list so that it has a high enough priority to be effective (e.g., if your rules specify -a trailing bf(--exclude='*') rule, the auto-added rule would never be +a trailing inclusion/exclusion of '*', the auto-added rule would never be reached). IMPORTANT: the bf(--partial-dir) should not be writable by other users or it @@ -1272,11 +1316,9 @@ updated file into a holding directory until the end of the transfer, at which time all the files are renamed into place in rapid succession. This attempts to make the updating of the files a little more atomic. By default the files are placed into a directory named ".~tmp~" in -each file's destination directory, but you can override this by specifying -the bf(--partial-dir) option. (Note that RSYNC_PARTIAL_DIR has no effect -on this value, nor is bf(--partial-dir) considered to be implied for the -purposes of the daemon-config's "refuse options" setting.) -Conflicts with bf(--inplace). +each file's destination directory, but if you've specified the +bf(--partial-dir) option, that directory will be used instead. +Conflicts with bf(--inplace) and bf(--append). This option uses more memory on the receiving side (one bit per file transferred) and also requires enough free disk space on the receiving