Home Explore Blog CI



man-pages

33th chunk of `rsync.man`
fa51150969f7d0b3d213dd01fc3ea78618baf736e3d21c6d0000000100000ffc
 and  copying  devices via the --devices option.
              This is useful for systems that allow such activities without be‐
              ing the super‐user, and also for ensuring that you will  get  er‐
              rors if the receiving side isn’t being run as the super‐user.  To
              turn  off  super‐user activities, the super‐user can use --no‐su‐
              per.

       --fake‐super
              When this option is enabled, rsync simulates  super‐user  activi‐
              ties  by  saving/restoring  the privileged attributes via special
              extended attributes that are attached to each file  (as  needed).
              This  includes  the  file’s owner and group (if it is not the de‐
              fault), the file’s device info (device & special files  are  cre‐
              ated  as empty text files), and any permission bits that we won’t
              allow to be set on the real file (e.g. the real file gets  u‐s,g‐
              s,o‐t  for  safety) or that would limit the owner’s access (since
              the real super‐user can always access/change a file, the files we
              create can always be  accessed/changed  by  the  creating  user).
              This  option also handles ACLs (if --acls was specified) and non‐
              user extended attributes (if --xattrs was specified).

              This is a good way to backup data without using a super‐user, and
              to store ACLs from incompatible systems.

              The --fake‐super option only affects the side where the option is
              used.  To affect the remote side of  a  remote‐shell  connection,
              use the --remote‐option (-M) option:

                  rsync ‐av ‐M‐‐fake‐super /src/ host:/dest/

              For  a  local  copy,  this option affects both the source and the
              destination.  If you wish a local copy to enable this option just
              for the destination files, specify -M--fake‐super.  If you wish a
              local copy to enable this option just for the source files,  com‐
              bine --fake‐super with -M--super.

              This option is overridden by both --super and --no‐super.

              See also the fake super setting in the daemon’s rsyncd.conf file.

       --sparse, -S
              Try to handle sparse files efficiently so they take up less space
              on  the destination.  If combined with --inplace the file created
              might not end up with sparse blocks  with  some  combinations  of
              kernel version and/or filesystem type.  If --whole‐file is in ef‐
              fect  (e.g.  for  a  local copy) then it will always work because
              rsync truncates the file prior to writing out  the  updated  ver‐
              sion.

              Note that versions of rsync older than 3.1.3 will reject the com‐
              bination of --sparse and --inplace.

       --preallocate
              This  tells the receiver to allocate each destination file to its
              eventual size before writing data to the file.  Rsync  will  only
              use  the  real filesystem‐level preallocation support provided by
              Linux’s fallocate(2) system call or Cygwin’s  posix_fallocate(3),
              not  the  slow  glibc implementation that writes a null byte into
              each block.

              Without this option, larger files may not be entirely  contiguous
              on  the filesystem, but with this option rsync will probably copy
              more slowly.  If the  destination  is  not  an  extent‐supporting
              filesystem  (such as ext4, xfs, NTFS, etc.), this option may have
              no positive effect at all.

              If combined with --sparse, the file will only have sparse  blocks
              (as  opposed  to allocated sequences of null bytes) if the kernel
              version and filesystem type support creating holes in  the  allo‐
       

Title: Rsync Options: Fake Super, Sparse Files, and Preallocation
Summary
This section explains the '--fake-super' option, which simulates super-user activities by saving and restoring privileged attributes via extended attributes, and how it interacts with local and remote copies. It also details the '--sparse' option for handling sparse files efficiently and the '--preallocate' option, which tells the receiver to allocate destination files to their final size before writing data, using the system's filesystem-level preallocation support.