Home Explore Blog CI



man-pages

51th chunk of `rsync.man`
f147f48ae6986ad98a0fa1bc730fcbe77fc202479489d6810000000100000fe0
 destination  file,  but  instead  must  copy it into place.
              Rsync does this by copying the file over the top of the  destina‐
              tion  file,  which  means  that the destination file will contain
              truncated data during this copy.  If this were not done this  way
              (even  if  the  destination file were first removed, the data lo‐
              cally copied to a temporary file in  the  destination  directory,
              and  then  renamed  into  place) it would be possible for the old
              file to continue taking up disk space (if someone had  it  open),
              and thus there might not be enough room to fit the new version on
              the disk at the same time.

              If you are using this option for reasons other than a shortage of
              disk  space,  you may wish to combine it with the --delay‐updates
              option, which will ensure that all copied files get put into sub‐
              directories in the destination hierarchy, awaiting the end of the
              transfer.  If you don’t have enough room to duplicate all the ar‐
              riving files on the destination partition, another  way  to  tell
              rsync that you aren’t overly concerned about disk space is to use
              the --partial‐dir option with a relative path; because this tells
              rsync  that  it  is  OK to stash off a copy of a single file in a
              subdir in the destination hierarchy, rsync will use the  partial‐
              dir as a staging area to bring over the copied file, and then re‐
              name  it  into place from there. (Specifying a --partial‐dir with
              an absolute path does not have this side‐effect.)

       --fuzzy, -y
              This option tells rsync that it should look for a basis file  for
              any  destination  file  that  is  missing.  The current algorithm
              looks in the same directory as the destination file for either  a
              file  that  has  an  identical size and modified‐time, or a simi‐
              larly‐named file.  If found, rsync uses the fuzzy basis  file  to
              try to speed up the transfer.

              If  the  option  is repeated, the fuzzy scan will also be done in
              any matching alternate destination directories that are specified
              via --compare‐dest, --copy‐dest, or --link‐dest.

              Note that the use of the --delete option might get rid of any po‐
              tential fuzzy‐match files, so either use --delete‐after or  spec‐
              ify some filename exclusions if you need to prevent this.

       --compare‐dest=DIR
              This option instructs rsync to use DIR on the destination machine
              as  an  additional hierarchy to compare destination files against
              doing transfers (if the files are missing in the destination  di‐
              rectory).   If  a  file  is found in DIR that is identical to the
              sender’s file, the file will NOT be transferred to  the  destina‐
              tion  directory.   This is useful for creating a sparse backup of
              just files that have changed from an earlier backup.  This option
              is typically used to copy into an empty (or newly created) direc‐
              tory.

              Beginning in version 2.6.4, multiple  --compare‐dest  directories
              may be provided, which will cause rsync to search the list in the
              order  specified  for  an  exact match.  If a match is found that
              differs only in attributes, a local copy is made and the  attrib‐
              utes  updated.  If a match is not found, a basis file from one of
              the DIRs will be selected to try to speed up the transfer.

              If DIR is a relative path, it is relative to the destination  di‐
              rectory.  See also --copy‐dest and --link‐dest.

       

Title: Rsync Options: --temp-dir (continued), --fuzzy, and --compare-dest
Summary
The explanation of the --temp-dir option concludes, emphasizing the importance of considering the --delay-updates or --partial-dir options in scenarios where disk space is not the primary concern. Following this, the documentation describes the --fuzzy option, enabling rsync to identify similar files in the destination directory as a basis for faster transfer. Repeating this option extends the scan to directories specified by --compare-dest, --copy-dest, or --link-dest. Finally, the documentation defines --compare-dest, which designates a directory to compare against the destination to avoid transferring unchanged files, useful for sparse backups. Multiple --compare-dest directories can be specified, and relative paths are relative to the destination directory.