Home Explore Blog CI



man-pages

61th chunk of `rsync.man`
d4deb0ecdf77f49a328580226f5c9ac3f67d2f36f912aa0c0000000100000ff5
 changed in any way  (as  long
              as  the  receiving  side  is at least 2.6.4).  See the --itemize‐
              changes option for a description of the output of "%i".

              Rsync will output the out‐format string prior to a file’s  trans‐
              fer unless one of the transfer‐statistic escapes is requested, in
              which case the logging is done at the end of the file’s transfer.
              When this late logging is in effect and --progress is also speci‐
              fied,  rsync  will  also output the name of the file being trans‐
              ferred prior to its progress information (followed, of course, by
              the out‐format output).

       --log‐file=FILE
              This option causes rsync to log what it is doing to a file.  This
              is similar to the logging that a daemon  does,  but  can  be  re‐
              quested  for the client side and/or the server side of a non‐dae‐
              mon transfer.  If specified as a client option, transfer  logging
              will  be  enabled  with  a  default format of "%i %n%L".  See the
              --log‐file‐format option if you wish to override this.

              Here’s an example command that requests the remote  side  to  log
              what is happening:

                  rsync ‐av ‐‐remote‐option=‐‐log‐file=/tmp/rlog src/ dest/

              This  is  very  useful  if  you need to debug why a connection is
              closing unexpectedly.

              See also the daemon version of the --log‐file option.

       --log‐file‐format=FORMAT
              This allows you to specify exactly what per‐update logging is put
              into the file specified by the --log‐file option (which must also
              be specified for this option to have any effect).  If you specify
              an empty string, updated files will not be mentioned in  the  log
              file.   For  a  list  of  the possible escape characters, see the
              log format setting in the rsyncd.conf manpage.

              The default FORMAT used if --log‐file is specified and  this  op‐
              tion is not is ’%i %n%L’.

              See also the daemon version of the --log‐file‐format option.

       --stats
              This tells rsync to print a verbose set of statistics on the file
              transfer, allowing you to tell how effective rsync’s delta‐trans‐
              fer  algorithm  is  for  your data.  This option is equivalent to
              --info=stats2  if  combined  with  0  or   1   -v   options,   or
              --info=stats3 if combined with 2 or more -v options.

              The current statistics are as follows:

              o      Number of files  is  the  count  of  all  "files"  (in the
                     generic sense), which includes directories, symlinks, etc.
                     The total count will be followed by a list  of  counts  by
                     filetype  (if the total is non‐zero).  For example: "(reg:
                     5, dir: 3, link: 2, dev: 1, special: 1)" lists the  totals
                     for  regular  files,  directories,  symlinks, devices, and
                     special files.  If any of value is  0,  it  is  completely
                     omitted from the list.

              o      Number of created files  is  the count of how many "files"
                     (generic sense) were created (as opposed to updated).  The
                     total count will be followed by a list of counts by  file‐
                     type (if the total is non‐zero).

              o      Number of deleted files  is  the count of how many "files"
                     (generic sense) were deleted.  The  total  count  will  be
                     followed  by a list of counts by filetype (if the total is
                     non‐zero).  Note that this line is only  output  if  dele‐
                     tions are in effect, and only if protocol

Title: Rsync Log File, Log File Format, and Statistics Options
Summary
This section details the `--log-file` option, which enables rsync to log its actions to a specified file, similar to daemon logging. It also explains `--log-file-format`, which customizes the log output. Lastly, the section covers the `--stats` option, which provides detailed statistics on the file transfer, including the number of files, created files, and deleted files, along with breakdowns by file type.