Home Explore Blog CI



man-pages

57th chunk of `rsync.man`
a31bb4b128713531cfac335cf79f9c336db9c396666fc44d0000000100000fbe
 names in  effect  on  the  receiving
              side (typically "root").  All other FROM names match those in use
              on  the sending side.  All TO names match those in use on the re‐
              ceiving side.

              Any IDs that do not have a name on the sending side  are  treated
              as having an empty name for the purpose of matching.  This allows
              them  to  be  matched  via a "*" or using an empty name.  For in‐
              stance:

                  ‐‐usermap=:nobody ‐‐groupmap=*:nobody

              When the --numeric‐ids option is used, the sender does  not  send
              any  names,  so  all the IDs are treated as having an empty name.
              This means that you will need to specify numeric FROM  values  if
              you want to map these nameless IDs to different values.

              For  the  --usermap  option to work, the receiver will need to be
              running as a super‐user (see also the  --super  and  --fake‐super
              options).   For  the --groupmap option to work, the receiver will
              need to have permissions to set that group.

              Starting with rsync  3.2.4,  the  --usermap  option  implies  the
              --owner  (-o)  option  while  the  --groupmap  option implies the
              --group (-g) option (since rsync needs to have those options  en‐
              abled for the mapping options to work).

              An  older  rsync  client  may need to use -s to avoid a complaint
              about wildcard characters, but a modern rsync handles this  auto‐
              matically.

       --chown=USER:GROUP
              This  option  forces  all  files  to  be owned by USER with group
              GROUP.  This is  a  simpler  interface  than  using  --usermap  &
              --groupmap  directly,  but  it is implemented using those options
              internally so they cannot be mixed.  If either the USER or  GROUP
              is  empty,  no mapping for the omitted user/group will occur.  If
              GROUP is empty, the trailing colon may be omitted, but if USER is
              empty, a leading colon must be supplied.

              If you specify "--chown=foo:bar", this is  exactly  the  same  as
              specifying  "--usermap=*:foo --groupmap=*:bar",  only easier (and
              with the same implied --owner and/or --group options).

              An older rsync client may need to use -s  to  avoid  a  complaint
              about  wildcard characters, but a modern rsync handles this auto‐
              matically.

       --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.

       --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.

       --address=ADDRESS
              By default rsync will bind to the wildcard address when  connect‐
              ing to an rsync daemon.  The --address option allows you to spec‐
              ify a specific IP address (or hostname) to bind to.

              See also the daemon version of the --address option.

       --port=PORT
              This  specifies  an  alternate TCP port number to use rather than
              the default of 873.  This is only needed if  you  are  using  the
              double‐colon  (::)  syntax to connect with an rsync daemon (since
              the URL syntax has a way to specify the port as  a  part  of  the
              URL).

              See also the daemon version of the --port option.

       --sockopts=OPTIONS
              This  option  can provide endless fun for people who like to tune
              their systems to the

Title: Rsync Options: Continued Discussion of --usermap, --groupmap, --chown, --timeout, --contimeout, --address, and --port
Summary
This section continues explaining the `--usermap` and `--groupmap` options, highlighting that `--usermap` implies `--owner` and `--groupmap` implies `--group` in rsync 3.2.4+. It then introduces `--chown`, a simplified interface using `--usermap` and `--groupmap` to force ownership, but the two approaches cannot be mixed. It covers `--timeout` and `--contimeout` for setting I/O and connection timeouts, respectively. It also explains `--address` for specifying the IP address to bind to when connecting to an rsync daemon and `--port` for using an alternate TCP port. Finally, it introduces `--sockopts` as a more advanced, system-tuning-oriented option.