[SCM] The rsync repository. - branch master updated

Rsync CVS commit messages rsync-cvs at lists.samba.org
Mon Jun 22 21:12:56 UTC 2020


The branch, master has been updated
       via  5a9e4ae5 Improve the options info a bit more.
       via  30945523 Add `--zl=N` opt & improve its docs.
       via  e4c9ff58 Make --backup be set when --backup-dir is used
       via  9b13bcf1 Add Documentation field to systemd unit
      from  8f6d6bcb Tweak valid_ipaddr() check.

https://git.samba.org/?p=rsync.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 5a9e4ae5e7fa7a626e966cfa8c836bf34a2eceb2
Author: Wayne Davison <wayne at opencoder.net>
Date:   Mon Jun 22 14:12:27 2020 -0700

    Improve the options info a bit more.

commit 3094552311b76a7316f6987ad5f21e28318b4313
Author: Wayne Davison <wayne at opencoder.net>
Date:   Mon Jun 22 13:41:42 2020 -0700

    Add `--zl=N` opt & improve its docs.

commit e4c9ff5873dbeb5aa299824cd93bc598f1871518
Author: Samuel Henrique <samueloph at debian.org>
Date:   Mon Jun 22 19:34:32 2020 +0100

    Make --backup be set when --backup-dir is used

commit 9b13bcf1855c8601b9c3d3fc709788a3e3249131
Author: Samuel Henrique <samueloph at debian.org>
Date:   Mon Jun 22 19:47:07 2020 +0100

    Add Documentation field to systemd unit

-----------------------------------------------------------------------

Summary of changes:
 NEWS.md                         |   4 ++
 options.c                       |   2 +
 packaging/systemd/rsync.service |   1 +
 rsync.1.md                      | 106 ++++++++++++++++++++++++++--------------
 4 files changed, 75 insertions(+), 38 deletions(-)


Changeset truncated at 500 lines:

diff --git a/NEWS.md b/NEWS.md
index 5b8946aa..a2d9f0f0 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -29,6 +29,10 @@ Protocol: 31 (unchanged)
 
 ### ENHANCEMENTS:
 
+ - The use of `--backup-dir=STR` now implies `--backup`.
+
+ - Added `--zl=NUM` as a short-hand for `--compress-level=NUM`.
+
  - Added `--early-input=FILE` option that allows the client to send some
    data to a daemon's (optional) "early exec" script on its stdin.
 
diff --git a/options.c b/options.c
index b5aaadee..73d5ed47 100644
--- a/options.c
+++ b/options.c
@@ -945,6 +945,7 @@ static struct poptOption long_options[] = {
   {"zc",               0,  POPT_ARG_STRING, &compress_choice, 0, 0, 0 },
   {"skip-compress",    0,  POPT_ARG_STRING, &skip_compress, 0, 0, 0 },
   {"compress-level",   0,  POPT_ARG_INT,    &do_compression_level, 0, 0, 0 },
+  {"zl",               0,  POPT_ARG_INT,    &do_compression_level, 0, 0, 0 },
   {0,                 'P', POPT_ARG_NONE,   0, 'P', 0, 0 },
   {"progress",         0,  POPT_ARG_VAL,    &do_progress, 1, 0, 0 },
   {"no-progress",      0,  POPT_ARG_VAL,    &do_progress, 0, 0, 0 },
@@ -2222,6 +2223,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
 	}
 	if (backup_dir) {
 		size_t len;
+		make_backups = 1; /* --backup-dir implies --backup */
 		while (*backup_dir == '.' && backup_dir[1] == '/')
 			backup_dir += 2;
 		if (*backup_dir == '.' && backup_dir[1] == '\0')
diff --git a/packaging/systemd/rsync.service b/packaging/systemd/rsync.service
index 6d1031fd..fafe72b3 100644
--- a/packaging/systemd/rsync.service
+++ b/packaging/systemd/rsync.service
@@ -2,6 +2,7 @@
 Description=fast remote file copy program daemon
 ConditionPathExists=/etc/rsyncd.conf
 After=network.target
+Documentation=man:rsync(1) man:rsyncd.conf(5)
 
 [Service]
 ExecStart=/usr/bin/rsync --daemon --no-detach
diff --git a/rsync.1.md b/rsync.1.md
index 4a3099b9..b8647ace 100644
--- a/rsync.1.md
+++ b/rsync.1.md
@@ -381,7 +381,7 @@ detailed description below for a complete description.
 --write-devices          write to devices as files (implies --inplace)
 --dry-run, -n            perform a trial run with no changes made
 --whole-file, -W         copy files whole (w/o delta-xfer algorithm)
---checksum-choice=STR    choose the checksum algorithms
+--checksum-choice=STR    choose the checksum algorithms (aka --cc)
 --one-file-system, -x    don't cross filesystem boundaries
 --block-size=SIZE, -B    force a fixed checksum block-size
 --rsh=COMMAND, -e        specify the remote shell to use
@@ -422,7 +422,8 @@ detailed description below for a complete description.
 --copy-dest=DIR          ... and include copies of unchanged files
 --link-dest=DIR          hardlink to files in DIR when unchanged
 --compress, -z           compress file data during the transfer
---compress-level=NUM     explicitly set compression level
+--compress-choice=STR    choose the compression algorithm (aka --zc)
+--compress-level=NUM     explicitly set compression level (aka --zl)
 --skip-compress=LIST     skip compressing files with suffix in LIST
 --cvs-exclude, -C        auto-ignore files in the same way CVS does
 --filter=RULE, -f        add a file-filtering RULE
@@ -644,7 +645,7 @@ your home directory (remove the '=' for that).
     after using another mirroring system which may not preserve timestamps
     exactly.
 
-0.  `--modify-window`, `-@`
+0.  `--modify-window=NUM`, `-@`
 
     When comparing two timestamps, rsync treats the timestamps as being equal
     if they differ by no more than the modify-window value.  The default is 0,
@@ -842,7 +843,7 @@ your home directory (remove the '=' for that).
 
 0.  `--backup-dir=DIR`
 
-    In combination with the `--backup` option, this tells rsync to store all
+    This implies the `--backup` option, and tells rsync to store all
     backups in the specified directory on the receiving side.  This can be used
     for incremental backups.  You can additionally specify a backup suffix
     using the `--suffix` option (otherwise the files backed up in the specified
@@ -1225,7 +1226,7 @@ your home directory (remove the '=' for that).
     those used by `--fake-super`) unless you repeat the option (e.g. `-XX`).
     This "copy all xattrs" mode cannot be used with `--fake-super`.
 
-0.  `--chmod`
+0.  `--chmod=CHMOD`
 
     This option tells rsync to apply one or more comma-separated "chmod" modes
     to the permission of the files in the transfer.  The resulting value is
@@ -1750,7 +1751,7 @@ your home directory (remove the '=' for that).
 
     Note that rsync versions prior to 3.1.0 did not allow `--min-size=0`.
 
-0.  `--block-size=BLOCKSIZE`, `-B`
+0.  `--block-size=SIZE`, `-B`
 
     This forces the block size used in rsync's delta-transfer algorithm to a
     fixed value.  It is normally selected based on the size of each file being
@@ -2311,11 +2312,40 @@ your home directory (remove the '=' for that).
     enough to handle a compression negotiation list, the list is silently
     ignored unless it contains the string "FAIL".
 
-0.  `--compress-level=NUM`
+0.  `--compress-level=NUM`, `--zl=NUM`
 
-    Explicitly set the compression level to use (see `--compress`) instead of
-    letting it default.  If NUM is non-zero, the `--compress` option is
-    implied.
+    Explicitly set the compression level to use (see `--compress`, `-z`)
+    instead of letting it default.  The `--compress` option is implied as long
+    as the level chosen is not a "don't compress" level for the compression
+    algorithm that is in effect (e.g. zlib compression treats level 0 as
+    "off").
+
+    The level values vary depending on the checksum in effect.  Because rsync
+    will negotiate a checksum choice by default when the remote rsync is new
+    enough, it can be good to combine this option with a `--compress-choice`
+    (`--zc`) option unless you're sure of the choice in effect.  For example:
+
+    >     rsync -aiv --zc=zstd --zl=22 host:src/ dest/
+
+    For zlib & zlibx compression, the valid values are from 1 to 9 with 6 being
+    the default.  Specifying 0 turns compression off, and specifying -1 chooses
+    the default of 6.
+
+    For zstd compression, the valid values are from -131072 to 22 with 3 being
+    the default. Specifying 0 chooses the default of 3.
+
+    For lz4 compression, there are no levels available, so the level is always
+    0.
+
+    If you specify a too-large or too-small value, the number is silently
+    limited to a valid value.  This allows you to specify something like
+    `--zl=999999999` and be assured that you'll end up with the maximum
+    compression level no matter what algorithm was chosen.
+
+    If you want to know the compression level that is in effect, specify the
+    `--debug=nstr` to see the "negotiated string" results.  This will report
+    something like "`Client compress: zstd (level 3)`" (along with the checksum
+    choice in effect).
 
 0.  `--skip-compress=LIST`
 
@@ -2483,19 +2513,19 @@ your home directory (remove the '=' for that).
     If you specify "`--chown=foo:bar`", this is exactly the same as specifying
     "`--usermap=*:foo --groupmap=*:bar`", only easier.
 
-0.  `--timeout=TIMEOUT`
+0.  `--timeout=SECONDS`
 
     This option allows you to set a maximum I/O timeout in seconds.  If no data
     is transferred for the specified time then rsync will exit.  The default is
     0, which means no timeout.
 
-0.  `--contimeout`
+0.  `--contimeout=SECONDS`
 
     This option allows you to set the amount of time that rsync will wait for
     its connection to an rsync daemon to succeed.  If the timeout is reached,
     rsync exits with an error.
 
-0.  `--address`
+0.  `--address=ADDRESS`
 
     By default rsync will bind to the wildcard address when connecting to an
     rsync daemon.  The `--address` option allows you to specify a specific IP
@@ -2510,7 +2540,7 @@ your home directory (remove the '=' for that).
     the port as a part of the URL).  See also this option in the `--daemon`
     mode section.
 
-0.  `--sockopts`
+0.  `--sockopts=OPTIONS`
 
     This option can provide endless fun for people who like to tune their
     systems to the utmost degree.  You can set all sorts of socket options
@@ -2963,7 +2993,7 @@ your home directory (remove the '=' for that).
 
     CAUTION: sending SIGVTALRM to an older rsync (pre-3.2.0) will kill it.
 
-0. `--password-file=FILE`
+0.  `--password-file=FILE`
 
     This option allows you to provide a password for accessing an rsync daemon
     via a file or via standard input if **FILE** is `-`.  The file should
@@ -2978,7 +3008,7 @@ your home directory (remove the '=' for that).
     authentication (i.e. if you have also specified a password in the daemon's
     config file).
 
-0. `--early-input=FILE`
+0.  `--early-input=FILE`
 
     This option allows rsync to send up to 5K of data to the "early exec"
     script on its stdin.  One possible use of this data is to give the script a
@@ -2987,7 +3017,7 @@ your home directory (remove the '=' for that).
 
     The daemon must be at least version 3.2.1.
 
-0. `--list-only`
+0.  `--list-only`
 
     This option will cause the source files to be listed instead of
     transferred.  This option is inferred if there is a single source arg and
@@ -3016,7 +3046,7 @@ your home directory (remove the '=' for that).
     need to expand a directory's content), or turn on recursion and exclude the
     content of subdirectories: `-r --exclude='/*/*'`.
 
-0. `--bwlimit=RATE`
+0.  `--bwlimit=RATE`
 
     This option allows you to specify the maximum transfer rate for the data
     sent over the socket, specified in units per second.  The RATE value can be
@@ -3042,13 +3072,13 @@ your home directory (remove the '=' for that).
     buffered, while other can show up as very slow when the flushing of the
     output buffer occurs.  This may be fixed in a future version.
 
-0. `--write-batch=FILE`
+0.  `--write-batch=FILE`
 
     Record a file that can later be applied to another identical destination
     with `--read-batch`.  See the "BATCH MODE" section for details, and also
     the `--only-write-batch` option.
 
-0. `--only-write-batch=FILE`
+0.  `--only-write-batch=FILE`
 
     Works like `--write-batch`, except that no updates are made on the
     destination system when creating the batch.  This lets you transport the
@@ -3067,13 +3097,13 @@ your home directory (remove the '=' for that).
     into the batch file without having to flow over the wire to the receiver
     (when pulling, the sender is remote, and thus can't write the batch).
 
-0. `--read-batch=FILE`
+0.  `--read-batch=FILE`
 
     Apply all of the changes stored in FILE, a file previously generated by
     `--write-batch`.  If _FILE_ is `-`, the batch data will be read from
     standard input. See the "BATCH MODE" section for details.
 
-0. `--protocol=NUM`
+0.  `--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
@@ -3083,7 +3113,7 @@ your home directory (remove the '=' for that).
     protocol version to be used in the batch file (assuming you can't upgrade
     the rsync on the reading system).
 
-0. `--iconv=CONVERT_SPEC`
+0.  `--iconv=CONVERT_SPEC`
 
     Rsync can convert filenames between character sets using this option.
     Using a CONVERT_SPEC of "." tells rsync to look up the default
@@ -3115,7 +3145,7 @@ your home directory (remove the '=' for that).
     free to specify just the local charset for a daemon transfer (e.g.
     `--iconv=utf8`).
 
-0. `--ipv4`, `-4` or `--ipv6`, `-6`
+0.  `--ipv4`, `-4` or `--ipv6`, `-6`
 
     Tells rsync to prefer IPv4/IPv6 when creating sockets or running ssh.  This
     affects sockets that rsync has direct control over, such as the outgoing
@@ -3131,7 +3161,7 @@ your home directory (remove the '=' for that).
     have no effect.  The `rsync -V` output will contain "`no IPv6`" if is the
     case.
 
-0. `--checksum-seed=NUM`
+0.  `--checksum-seed=NUM`
 
     Set the checksum seed to the integer NUM.  This 4 byte checksum seed is
     included in each block and MD4 file checksum calculation (the more modern
@@ -3146,7 +3176,7 @@ your home directory (remove the '=' for that).
 
 The options allowed when starting an rsync daemon are as follows:
 
-0. `--daemon`
+0.  `--daemon`
 
     This tells rsync that it is to run as a daemon.  The daemon you start
     running may be accessed using an rsync client using the `host::module` or
@@ -3158,7 +3188,7 @@ The options allowed when starting an rsync daemon are as follows:
     each connect made by a client and respond to requests accordingly.  See the
     **rsyncd.conf**(5) man page for more details.
 
-0. `--address`
+0.  `--address=ADDRESS`
 
     By default rsync will bind to the wildcard address when run as a daemon
     with the `--daemon` option.  The `--address` option allows you to specify a
@@ -3166,14 +3196,14 @@ The options allowed when starting an rsync daemon are as follows:
     possible in conjunction with the `--config` option.  See also the "address"
     global option in the rsyncd.conf manpage.
 
-0. `--bwlimit=RATE`
+0.  `--bwlimit=RATE`
 
     This option allows you to specify the maximum transfer rate for the data
     the daemon sends over the socket.  The client can still specify a smaller
     `--bwlimit` value, but no larger value will be allowed.  See the client
     version of this option (above) for some extra details.
 
-0. `--config=FILE`
+0.  `--config=FILE`
 
     This specifies an alternate config file than the default.  This is only
     relevant when `--daemon` is specified.  The default is /etc/rsyncd.conf
@@ -3181,7 +3211,7 @@ The options allowed when starting an rsync daemon are as follows:
     user is not the super-user; in that case the default is rsyncd.conf in the
     current directory (typically $HOME).
 
-0. `--dparam=OVERRIDE`, `-M`
+0.  `--dparam=OVERRIDE`, `-M`
 
     This option can be used to set a daemon-config parameter when starting up
     rsync in daemon mode.  It is equivalent to adding the parameter at the end
@@ -3191,7 +3221,7 @@ The options allowed when starting an rsync daemon are as follows:
 
     >     rsync --daemon -M pidfile=/path/rsync.pid
 
-0. `--no-detach`
+0.  `--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
@@ -3200,37 +3230,37 @@ The options allowed when starting an rsync daemon are as follows:
     `--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.
 
-0. `--port=PORT`
+0.  `--port=PORT`
 
     This specifies an alternate TCP port number for the daemon to listen on
     rather than the default of 873.  See also the "port" global option in the
     rsyncd.conf manpage.
 
-0. `--log-file=FILE`
+0.  `--log-file=FILE`
 
     This option tells the rsync daemon to use the given log-file name instead
     of using the "`log file`" setting in the config file.
 
-0. `--log-file-format=FORMAT`
+0.  `--log-file-format=FORMAT`
 
     This option tells the rsync daemon to use the given FORMAT string instead
     of using the "`log format`" setting in the config file.  It also enables
     "`transfer logging`" unless the string is empty, in which case transfer
     logging is turned off.
 
-0. `--sockopts`
+0.  `--sockopts`
 
     This overrides the `socket options` setting in the rsyncd.conf file and has
     the same syntax.
 
-0. `--verbose`, `-v`
+0.  `--verbose`, `-v`
 
     This option increases the amount of information the daemon logs during its
     startup phase.  After the client connects, the daemon's verbosity level
     will be controlled by the options that the client used and the
     "`max verbosity`" setting in the module's config section.
 
-0. `--ipv4`, `-4` or `--ipv6`, `-6`
+0.  `--ipv4`, `-4` or `--ipv6`, `-6`
 
     Tells rsync to prefer IPv4/IPv6 when creating the incoming sockets that the
     rsync daemon will use to listen for connections.  One of these options may
@@ -3245,7 +3275,7 @@ The options allowed when starting an rsync daemon are as follows:
     have no effect.  The `rsync -V` output will contain "`no IPv6`" if is the
     case.
 
-0. `--help`, `-h`
+0.  `--help`, `-h`
 
     When specified after `--daemon`, print a short help page describing the
     options available for starting an rsync daemon.


-- 
The rsync repository.



More information about the rsync-cvs mailing list