A question about rsync

Dan Jenkins dan at rastech.com
Sun Jul 22 21:59:39 EDT 2007


brk wrote:
> I have a question for people who might be more intimately familiar  
> with rsync than I am...
>
> How does rsync "know" what files have been touched?
>
> What would happen if by some twist of fate a handful of files were  
> cleanly corrupted such that they would for all purposes appear to be  
> deleted or non-existent on a machine that had an rsync process  
> running to a remote backup machine?  Would those files be removed on  
> the remote machine, or would they likely remain in place there?
>   
Depends on the (numerous) options to rsync. Typically (someone correct 
me if I'm wrong), rsync uses the size and date/time on the file and a 
checksum. This can be modified to ignore times and force all files to be 
checksummed.

If rsync does not specify the --delete or --delete-excluded, then no 
files will be deleted. If one of the --delete options is in use, then 
files will be deleted on the destination.

I ALWAYS test rsync with the -v (--verbose) and -n (--dry-run) options 
to see what it is going to do, before I do it.

-- 
Dan Jenkins (dan at rastech.com)
Rastech Inc., Bedford, NH, USA --- 1-603-206-9951
*** Technical Support Excellence for over a Quarter Century




More information about the gnhlug-discuss mailing list