> I am trying to use rsync to copy files from several origins to a single 
> destination. I would like to detect when a file gets overwritten because it 
> is present with the same relative path/name in several origins:
> 
> 
> Origin1:
> foo/bar.txt
> 
> Origin2:
> foo/bar.txt
> 
> Destination after copy:
> foo/bar.txt -> is that from Origin1 or origin2?
> 
> 
> I know I can use the `--ignore-existing` option to make sure only the first 
> version is kept, or I could remove this option to keep the last one. But I 
> would like to be notified when this happens, either with a warning or an 
> error.
> 
> Is that possible with rsync?


The -i <--itemize-changes, output a change-summary for all updates> may do what 
you want.

However, my understanding for files which are detected to be the same in the 
source(s) and the destination will not be updated / overwritten. Perhaps 
someone else on the rsync mailing list may be able to clarify this point or 
answer your question more appropriately.


------------------------------------
 This email is protected by LBackup, 
 an rsync based, open source backup system
 designed for use with Mac OS X and GNU/Linux
 http://www.lbackup.org





-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to