X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/64c704f0b9e545e9c8525a6a07c3d134944c70f1..1db8b61de7fd31b9c7b02918e6c194255979f030:/rsync.yo diff --git a/rsync.yo b/rsync.yo index 1b3cd2b6..4b4b03ef 100644 --- a/rsync.yo +++ b/rsync.yo @@ -1,5 +1,5 @@ mailto(rsync-bugs@samba.org) -manpage(rsync)(1)(1 Mar 1999)()() +manpage(rsync)(1)(14 Dec 2001)()() manpagename(rsync)(faster, flexible replacement for rcp) manpagesynopsis() @@ -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 @@ -256,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 @@ -266,7 +267,8 @@ verb( --include-from=FILE don't exclude patterns listed in FILE --version print version number --daemon run as a rsync daemon - --address bind to the specified address + --no-detach do not detach from the parent + --address=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 @@ -275,7 +277,11 @@ verb( --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 + -f, --read-batch=FILE read batch file + -F, --write-batch write batch file -h, --help show this help screen + + ) manpageoptions() @@ -316,14 +322,26 @@ 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 which already exist and have the same checksum and size on the receiver are skipped. This option can be quite slow. -dit(bf(-a, --archive)) This is equivalent to -rlptgoD. It is a quick way -of saying you want recursion and want to preserve everything. +dit(bf(-a, --archive)) This is equivalent to -rlptgoD. It is a quick +way of saying you want recursion and want to preserve almost +everything. + +Note however that bf(-a) bf(does not preserve hardlinks), because +finding multiply-linked files is expensive. You must separately +specify bf(-H). dit(bf(-r, --recursive)) This tells rsync to copy directories recursively. If you don't specify this then rsync won't copy @@ -387,8 +405,11 @@ are in the list of files being sent. This option can be quite slow, so only use it if you need it. dit(bf(-W, --whole-file)) With this option the incremental rsync algorithm -is not used and the whole file is sent as-is instead. This may be -useful when using rsync with a local machine. +is not used and the whole file is sent as-is instead. The transfer may be +faster if this option is used when the bandwidth between the source and +target machines is higher than the bandwidth to disk (especially when the +"disk" is actually a networked file system). This is the default when both +the source and target are on the local machine. dit(bf(-p, --perms)) This option causes rsync to update the remote permissions to be the same as the local permissions. @@ -451,7 +472,7 @@ If the sending side detects any IO errors then the deletion of any files at the destination will be automatically disabled. This is to prevent temporary filesystem failures (such as NFS errors) on the sending side causing a massive deletion of files on the -destination. +destination. You can override this with the --ignore-errors option. dit(bf(--delete-excluded)) In addition to deleting the files on the receiving side that are not on the sending side, this tells rsync to also @@ -462,6 +483,9 @@ transferring files to try to ensure that there is sufficient space on the receiving filesystem. If you want to delete after transferring then use the --delete-after switch. +dit(bf(--ignore-errors)) Tells --delete to go ahead and delete files +even when there are IO errors. + dit(bf(--force)) This options tells rsync to delete directories even if they are not empty. This applies to both the --delete option and to cases where rsync tries to copy a normal file but the destination @@ -470,7 +494,7 @@ contains a directory of the same name. Since this option was added, deletions were reordered to be done depth-first so it is hardly ever needed anymore except in very obscure cases. -dit(bf(-B , --block_size=BLOCKSIZE)) This controls the block size used in +dit(bf(-B , --block-size=BLOCKSIZE)) This controls the block size used in the rsync algorithm. See the technical report for details. dit(bf(-e, --rsh=COMMAND)) This option allows you to choose an alternative @@ -481,6 +505,8 @@ like to instead use ssh because of its high security. You can also choose the remote shell program using the RSYNC_RSH environment variable. +See also the --blocking-io option which is affected by this option. + dit(bf(--rsync-path=PATH)) Use this to specify the path to the copy of rsync on the remote machine. Useful when it's not in your path. Note that this is the full path to the binary, not just the directory that @@ -497,9 +523,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 @@ -552,20 +578,20 @@ scratch directory when creating temporary copies of the files transferred on the receiving side. The default behavior is to create the temporary files in the receiving directory. -dit(bf(--compare-dest=DIR)) This option instructs rsync to use DIR as an -additional directory to compare destination files against when doing -transfers. This is useful for doing transfers to a new destination while -leaving existing files intact, and then doing a flash-cutover when all -files have been successfully transferred (for example by moving directories -around and removing the old directory, although this requires also doing -the transfer with -I to avoid skipping files that haven't changed). This -option increases the usefulness of --partial because partially transferred -files will remain in the new temporary destination until they have a chance -to be completed. If DIR is a relative path, it is relative to the -destination directory. +dit(bf(--compare-dest=DIR)) This option instructs rsync to use DIR on +the destination machine as an additional directory to compare destination +files against when doing transfers. This is useful for doing transfers to +a new destination while leaving existing files intact, and then doing a +flash-cutover when all files have been successfully transferred (for +example by moving directories around and removing the old directory, +although this requires also doing the transfer with -I to avoid skipping +files that haven't changed). This option increases the usefulness of +--partial because partially transferred files will remain in the new +temporary destination until they have a chance to be completed. If DIR is +a relative path, it is relative to the destination directory. dit(bf(-z, --compress)) With this option, rsync compresses any data from -the source file(s) which it sends to the destination machine. This +the files that it sends to the destination machine. This option is useful on slow links. The compression method used is the same method that gzip uses. @@ -599,6 +625,15 @@ config file (/etc/rsyncd.conf) on each connect made by a client and respond to requests accordingly. See the rsyncd.conf(5) man page for more details. +dit(bf(--no-detach)) When running as a daemon, this option instructs +rsync to not detach itself and become a background process. This +option is required when running as a service on Cygwin, and may also +be useful when rsync is supervised by a program such as +bf(daemontools) or AIX's bf(System Resource Controller). +bf(--no-detach) is also recommended when rsync is run under a +debugger. This option has no effect if rsync is run from inetd or +sshd. + dit(bf(--address)) By default rsync will bind to the wildcard address when run as a daemon with the --daemon option or when connecting to a rsync server. The --address option allows you to specify a specific IP @@ -612,10 +647,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(--blocking-io)) This tells rsync to use blocking IO when launching +a remote shell transport. If -e or --rsh are not specified or are set to +the default "rsh", this defaults to blocking IO, otherwise it defaults to +non-blocking IO. You may find the --blocking-io option is needed for some +remote shells that can't handle non-blocking IO. Ssh prefers 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 @@ -658,6 +694,11 @@ 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. +dit(bf(--read-batch)) Apply a previously generated change batch. + +dit(bf(--write-batch)) Generate a set of files that can be transferred +as a batch update. + enddit() manpagesection(EXCLUDE PATTERNS) @@ -668,7 +709,7 @@ selection of which files to transfer and which files to skip. rsync builds a ordered list of include/exclude options as specified on the command line. When a filename is encountered, rsync checks the name against each exclude/include pattern in turn. The first matching -pattern is acted on. If it is an exclude pattern than that file is +pattern is acted on. If it is an exclude pattern, then that file is 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. @@ -748,6 +789,29 @@ itemize( it would be excluded by the "*") ) +manpagesection(BATCH MODE) + +The following call generates 4 files that encapsulate the information +for synchronizing the contents of bf(target_dir) with the updates found in +bf(src_dir) + +quote( +$ rsync -F [other rsync options here] \nl() + /somewhere/src_dir /somewhere/target_dir +) + +The generated files are labeled with a common timestamp: + +itemize( +it() bf(rsync_argvs.) command-line arguments +it() bf(rsync_flist.) rsync internal file metadata +it() bf(rsync_csums.) rsync checksums +it() bf(rsync_delta.) data blocks for file update & change +) + +See bf(http://www.ils.unc.edu/i2dsi/unc_rsync+.html) for papers and technical +reports. + manpagesection(DIAGNOSTICS) rsync occasionally produces error messages that may seem a little @@ -771,6 +835,33 @@ 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(EXIT VALUES) + +startdit() +dit(bf(RERR_SYNTAX 1)) Syntax or usage error +dit(bf(RERR_PROTOCOL 2)) Protocol incompatibility +dit(bf(RERR_FILESELECT 3)) Errors selecting input/output files, dirs + +dit(bf(RERR_UNSUPPORTED 4)) Requested action not supported: an attempt +was made to manipulate 64-bit files on a platform that cannot support +them; or an option was speciifed that is supported by the client and +not by the server. + +dit(bf(RERR_SOCKETIO 10)) Error in socket IO +dit(bf(RERR_FILEIO 11)) Error in file IO +dit(bf(RERR_STREAMIO 12)) Error in rsync protocol data stream +dit(bf(RERR_MESSAGEIO 13)) Errors with program diagnostics +dit(bf(RERR_IPC 14)) Error in IPC code +dit(bf(RERR_SIGNAL 20)) Received SIGUSR1 or SIGINT +dit(bf(RERR_WAITCHILD 21)) Some error returned by waitpid() +dit(bf(RERR_MALLOC 22)) Error allocating core memory buffers +dit(bf(RERR_TIMEOUT 30)) Timeout in data send/receive +enddit() + manpagesection(ENVIRONMENT VARIABLES) startdit() @@ -831,7 +922,9 @@ rsync is distributed under the GNU public license. See the file COPYING for details. A WEB site is available at -url(http://rsync.samba.org/)(http://rsync.samba.org/) +url(http://rsync.samba.org/)(http://rsync.samba.org/). The site +includes an FAQ-O-Matic which may cover questions unanswered by this +manual page. The primary ftp site for rsync is url(ftp://rsync.samba.org/pub/rsync)(ftp://rsync.samba.org/pub/rsync). @@ -850,7 +943,9 @@ probably missed some people, my apologies if I have. manpageauthor() -rsync was written by Andrew Tridgell and Paul Mackerras. They may be -contacted via email at tridge@samba.org and -Paul.Mackerras@cs.anu.edu.au +rsync was written by Andrew Tridgell and Paul Mackerras. + +rsync is now maintained by Martin Pool . +Mailing lists for support and development are available at +url(http://lists.samba.org)(lists.samba.org)