rsync - using a --files-from list to cut out scanning. How to handle deletions? (fwd)

Paul Slootman paul+rsync at
Fri Jan 18 02:54:06 MST 2013

On Fri 18 Jan 2013, Robert Bell wrote:
> >
> >If a file exists in the target directory when using --link-dest rsync
> >modifies the link rather than replacing it which means you don't have
> >history for files that have been replaced rather than added or deleted.
> Thanks for your astute observation about updating hard-linked
> files: you had me worried for a while.
> Fortunately, we are using the --whole-file option in our production
> backups, since the target of our backups is an HSM system (SGI's DMF),
> and we don't want rsync to start comparing files (and thus triggering a
> recall).  With this option, if a file is changed between the source and
> a target which contains a hard-linked version of the file, then the
> rsync update replaces the file in the target, not overwrites it and all
> its hard-linked cousins. Whew!

Rsync will not update an existing file in-place unless you use the
--inplace option. So --whole-file is irrelevant for this.
Rsync (without --inplace) will always create a new (temporary) file,
using the existing data (without --whole-file) to enable the delta diff
speedup algorithm. Once the temp file is successfully created, it's
renamed to the original name, deleting the existing link. So any
hardlinked data will remain untouched.


More information about the rsync mailing list