--remove-sent-files to remove "synced" files

Matt McCutchen hashproduct+rsync at gmail.com
Mon Jun 19 17:18:23 GMT 2006


On Fri, 2006-06-16 at 16:48 -0400, Matthew Breedlove wrote:
> I appreciate the response.  What I was trying to do was setup rsync in a
> position so that if a network failure came about I can easily kick off
> the same rsync command to have it essentially pick-up where it left off.
> Having --remove-sent-files is definitely an improvement but if it fails
> it will still have to do checks against files that it didn't need to
> sync over.  If I am trying to sync over a large amount of files (10k+)
> over a longer period of time it would eliminate a lot of overhead needed
> to complete the sync.

By default, "doing checks" consists of the receiving rsync comparing the
size and mtime of an entry in the file list it received from the sender
to the size and mtime of the file in the destination directory.  If both
match, rsync assumes the data of the receiver's file is identical to the
data of the sender's file and skips transferring the data.  Thus, the
overhead of leaving each already synced file around consists of an extra
"stat" on each of the sender and the receiver and an extra 100 bytes or
so of network I/O for its file-list entry.  I wouldn't worry about it
unless you are using a low-bandwidth connection.

In addition, I have entered a feature request for a
--remove-source-files option.  Maybe it should really be called
--remove-synced-files.  If I knew more about rsync, I might try to
implement the option myself.

Matt



More information about the rsync mailing list