Christopher Pezley
2014-May-28 06:21 UTC
Flush delete command on rsync exit with --remove-source-files
When the option "--remove-source-files" is specified, files are not immediately deleted on the remote machine after being transfered. Instead, it is (as far as I understand) queued up in the list of actions. If rsync is ended with SIGTERM or SIGINT, then a transfered file may not be deleted on the remote machine. If the user moves the transfered files (for example sorting them into different folders) and then starts the transfer again, some files may be transfered more than once. Would it make sense / be possible to flush the delete commands during the graceful exit in order to insure that all transfered files have been deleted? Thanks, Christopher