- Improved the GENERAL section.
[rsync/rsync.git] / rsync.yo
index abcac12..f24b885 100644 (file)
--- a/rsync.yo
+++ b/rsync.yo
@@ -5,7 +5,7 @@ manpagesynopsis()
 
 rsync [OPTION]... SRC [SRC]... [USER@]HOST:DEST
 
-rsync [OPTION]... [USER@]HOST:SRC DEST
+rsync [OPTION]... [USER@]HOST:SRC [DEST]
 
 rsync [OPTION]... SRC [SRC]... DEST
 
@@ -44,41 +44,33 @@ itemize(
 
 manpagesection(GENERAL)
 
-There are eight different ways of using rsync. They are:
-
-itemize(
-       it() for copying local files. This is invoked when neither
-            source nor destination path contains a : separator
-       it() for copying from the local machine to a remote machine using
-       a remote shell program as the transport (such as ssh or
-       rsh). This is invoked when the destination path contains a
-       single : separator.
-       it() for copying from a remote machine to the local machine
-       using a remote shell program. This is invoked when the source
-       contains a : separator.
-       it() for copying from a remote rsync server to the local
-       machine. This is invoked when the source path contains a ::
-       separator or an rsync:// URL.
-       it() for copying from the local machine to a remote rsync
-       server. This is invoked when the destination path contains a ::
-       separator or an rsync:// URL.
-       it() for copying from a remote machine using a remote shell
-       program as the transport, using rsync server on the remote
-       machine.  This is invoked when the source path contains a ::
-       separator and the bf(--rsh=COMMAND) (aka "bf(-e COMMAND)") option is
-       also provided.
-       it() for copying from the local machine to a remote machine
-       using a remote shell program as the transport, using rsync
-       server on the remote machine.  This is invoked when the
-       destination path contains a :: separator and the
-       bf(--rsh=COMMAND) option is also provided.
-       it() for listing files on a remote machine. This is done the
-       same way as rsync transfers except that you leave off the
-       local destination.
-)
-
-Note that in all cases (other than listing) at least one of the source
-and destination paths must be local.
+Rsync copies files either to or from a remote host, or locally on the
+current host (it does not support copying files between two remote hosts).
+
+There are two different ways for rsync to contact a remote system: using a
+remote-shell program as the transport (such as ssh or rsh) or contacting an
+rsync daemon directly via TCP.  The remote-shell transport is used whenever
+the source or destination path contains a single colon (:) separator after
+a host specification.  Contacting an rsync daemon directly happens when the
+source or destination path contains a double colon (::) separator after a
+host specification, OR when an rsync:// URL is specified.
+
+As a special case, if a remote source is specified without a destination,
+the remote files are listed in an output format similar to "ls -l".
+
+As expected, if neither the source or destination path specify a remote
+host, the copy occurs locally (see also the bf(--list-only) option).
+
+Finally, it is possible to use a remote-shell transport to contact a remote
+host and then to spawn a single-use rsync daemon.  This allows the use of
+some of the daemon features (such as named modules) without having to run a
+daemon as a service.  To achieve this, invoke rsync with an explicit
+bf(--rsh=COMMAND) (aka "bf(-e COMMAND)") option combined with either the
+source or destination path specified as an rsync daemon (i.e. either a ::
+separator or an rsync:// URL).  In this case, rsync contacts the remote
+host specified using the specified remote shell, and then starts a
+single-use rsync daemon to deal with that copy request.  See the section
+"CONNECTING TO AN RSYNC SERVER OVER A REMOTE SHELL PROGRAM" below.
 
 manpagesection(SETUP)
 
@@ -374,8 +366,7 @@ to the detailed description below for a complete description.  verb(
      --include=PATTERN       don't exclude files matching PATTERN
      --include-from=FILE     read include patterns from FILE
      --files-from=FILE       read list of source-file names from FILE
- -0, --from0                 all *from file lists are delimited by nulls
-     --version               print version number
+ -0, --from0                 all *from/filter files are delimited by 0s
      --address=ADDRESS       bind address for outgoing socket to daemon
      --port=PORT             specify double-colon alternate port number
      --blocking-io           use blocking I/O for the remote shell
@@ -384,7 +375,7 @@ to the detailed description below for a complete description.  verb(
      --progress              show progress during transfer
  -P                          same as --partial --progress
  -i, --itemize-changes       output a change-summary for all updates
-     --log-format=FORMAT     log file-transfers using specified format
+     --log-format=FORMAT     output filenames using the specified format
      --password-file=FILE    read password from FILE
      --list-only             list the files instead of copying them
      --bwlimit=KBPS          limit I/O bandwidth; KBytes per second
@@ -395,6 +386,7 @@ to the detailed description below for a complete description.  verb(
      --checksum-seed=NUM     set block/file checksum seed (advanced)
  -4, --ipv4                  prefer IPv4
  -6, --ipv6                  prefer IPv6
+     --version               print version number
  -h, --help                  show this help screen)
 
 Rsync can also be run as a daemon, in which case the following options are
@@ -434,7 +426,7 @@ you are debugging rsync.
 
 Note that the names of the transferred files that are output are done using
 a default bf(--log-format) of "%n%L", which tells you just the name of the
-file and, if the item is a symlink, where it points.  At the single bf(-v)
+file and, if the item is a link, where it points.  At the single bf(-v)
 level of verbosity, this does not mention when a file gets its attributes
 changed.  If you ask for an itemized list of changed attributes (either
 bf(--itemize-changes) or adding "%i" to the bf(--log-format) setting), the
@@ -935,7 +927,7 @@ quote(tt(   rsync -a --files-from=:/path/file-list src:/ /tmp/copy))
 This would copy all the files specified in the /path/file-list file that
 was located on the remote "src" host.
 
-dit(bf(-0, --from0)) This tells rsync that the filenames it reads from a
+dit(bf(-0, --from0)) This tells rsync that the rules/filenames it reads from a
 file are terminated by a null ('\0') character, not a NL, CR, or CR+LF.
 This affects bf(--exclude-from), bf(--include-from), bf(--files-from), and any
 merged files specified in a bf(--filter) rule.
@@ -1097,7 +1089,7 @@ will be output if the associated attribute for the item is being updated or
 a "." for no change.  Three exceptions to this are: (1) a newly created
 item replaces each letter with a "+", (2) an identical item replaces the
 dots with spaces, and (3) an unknown attribute replaces each letter with
-a "?" (this happens when talking to an older rsync).
+a "?" (this can happen when talking to an older rsync).
 
 The attribute that is associated with each letter is as follows:
 
@@ -1137,7 +1129,7 @@ Specifying this option will mention each file, dir, etc. that gets updated
 in a significant way (a transferred file, a recreated symlink/device, or a
 touched directory) unless the itemized-changes escape (%i) is included in
 the string, in which case the logging of names increases to mention any
-item that is updated in any way (as long as the receiving side is version
+item that is changed in any way (as long as the receiving side is at least
 2.6.4).  See the bf(--itemized-changes) option for a description of the
 output of "%i".
 
@@ -1272,9 +1264,11 @@ single line.
 dit(bf(--list-only)) This option will cause the source files to be listed
 instead of transferred.  This option is inferred if there is no destination
 specified, so you don't usually need to use it explicitly.  However, it can
-come in handy for a power user that wants to avoid the "bf(-r --exclude='/*/*')"
+come in handy for a user that wants to avoid the "bf(-r --exclude='/*/*')"
 options that rsync might use as a compatibility kluge when generating a
-non-recursive listing.
+non-recursive listing, or to list the files that are involved in a local
+copy (since the destination path is not optional for a local copy, you
+must specify this option explicitly and still include a destination).
 
 dit(bf(--bwlimit=KBPS)) This option allows you to specify a maximum
 transfer rate in kilobytes per second. This option is most effective when
@@ -1314,9 +1308,9 @@ dit(bf(--protocol=NUM)) Force an older protocol version to be used.  This
 is useful for creating a batch file that is compatible with an older
 version of rsync.  For instance, if rsync 2.6.4 is being used with the
 bf(--write-batch) option, but rsync 2.6.3 is what will be used to run the
-bf(--read-batch) option, you should use "--protocol=28" (when creating the
-batch file) to force the older protocol version to be used in the batch
-file (assuming you can't upgrade the rsync on the reading system to 2.6.4).
+bf(--read-batch) option, you should use "--protocol=28" when creating the
+batch file to force the older protocol version to be used in the batch
+file (assuming you can't upgrade the rsync on the reading system).
 
 dit(bf(-4, --ipv4) or bf(-6, --ipv6)) Tells rsync to prefer IPv4/IPv6
 when creating sockets.  This only affects sockets that rsync has direct
@@ -2060,6 +2054,10 @@ see also the comments on the bf(--delete) option
 Please report bugs! See the website at
 url(http://rsync.samba.org/)(http://rsync.samba.org/)
 
+manpagesection(VERSION)
+
+This man page is current for version 2.6.4 of rsync.
+
 manpagesection(CREDITS)
 
 rsync is distributed under the GNU public license.  See the file