I have a rsync command in an application that copies the contents of a folder to another machine. I have the option --remove-source-files
because I'm only interested in having the files on the destination machine after the rsync has finished.
However, I was wondering how rsync behaves if it crashes or is interrupted while transferring files?
Consider I have two files to sync, a
and b
. Will rsync copy a
, then delete it from source, and start copying b
, or will it wait for both a
and b
to be copied to the destination machine before deleting them both? I've seen you can configure this behavior when deleting extraneous files with some flags, but found none about the removing of source files.