Home Explore Blog CI



man-pages

21th chunk of `rsync.man`
004c9da1a620732ddf334cb8179e35a4fbb2c1a9128e34b50000000100000fd3
 is a TRANSFER RULE, so don’t expect any exclude  side
              effects.

              A  caution  for those that choose to combine --inplace with --up‐
              date: an interrupted transfer will leave behind a partial file on
              the receiving side that has a very recent modified time,  so  re‐
              running  the  transfer will probably not continue the interrupted
              file.  As such, it is usually best to avoid combining  this  with
              --inplace  unless you have implemented manual steps to handle any
              interrupted in‐progress files.

       --inplace
              This option changes how rsync transfers  a  file  when  its  data
              needs  to be updated: instead of the default method of creating a
              new copy of the file and moving it into place  when  it  is  com‐
              plete, rsync instead writes the updated data directly to the des‐
              tination file.

              This has several effects:

              o      Hard  links  are not broken.  This means the new data will
                     be visible through other hard  links  to  the  destination
                     file.   Moreover,  attempts to copy differing source files
                     onto a multiply‐linked destination file will result  in  a
                     "tug  of  war" with the destination data changing back and
                     forth.

              o      In‐use binaries cannot be updated (either the OS will pre‐
                     vent this from happening,  or  binaries  that  attempt  to
                     swap‐in their data will misbehave or crash).

              o      The  file’s  data  will be in an inconsistent state during
                     the transfer and will be left that way if the transfer  is
                     interrupted or if an update fails.

              o      A  file  that  rsync  cannot  write  to cannot be updated.
                     While a super user can update  any  file,  a  normal  user
                     needs  to  be granted write permission for the open of the
                     file for writing to be successful.

              o      The efficiency of rsync’s delta‐transfer algorithm may  be
                     reduced  if some data in the destination file is overwrit‐
                     ten before it can be copied to a  position  later  in  the
                     file.   This  does  not  apply  if you use --backup, since
                     rsync is smart enough to use the backup file as the  basis
                     file for the transfer.

              WARNING:  you should not use this option to update files that are
              being accessed by others, so be careful when choosing to use this
              for a copy.

              This option is useful for transferring large  files  with  block‐
              based changes or appended data, and also on systems that are disk
              bound,  not network bound.  It can also help keep a copy‐on‐write
              filesystem snapshot from diverging the entire contents of a  file
              that only has minor changes.

              The  option implies --partial (since an interrupted transfer does
              not delete the file), but conflicts with --partial‐dir and  --de‐
              lay‐updates.   Prior to rsync 2.6.4 --inplace was also incompati‐
              ble with --compare‐dest and --link‐dest.

       --append
              This special copy mode only works  to  efficiently  update  files
              that are known to be growing larger where any existing content on
              the receiving side is also known to be the same as the content on
              the  sender.   The use of --append can be dangerous if you aren’t
              100% sure that all the files in the transfer are shared,  growing
              files.   You should thus use filter rules to ensure that you weed
              out any files that

Title: Rsync: In-Place Option Details, Append Option Introduction
Summary
This section continues the explanation of the '--inplace' option in rsync, detailing its effects on hard links, in-use binaries, file consistency, and write permissions. It cautions against using this option on files accessed by others and notes its usefulness for large files with block-based changes or appended data. It also mentions the implications for '--partial', '--partial-dir', and '--delay-updates', as well as older versions' compatibility with '--compare-dest' and '--link-dest'. Finally, it introduces the '--append' option for efficiently updating growing files with shared content, emphasizing the need for caution and filter rules to avoid unintended consequences.