(Not retransferring files deleted from destination)

Matt McCutchen matt at mattmccutchen.net
Mon Jun 22 01:46:31 GMT 2009


On Mon, 2009-06-22 at 09:24 +0800, Low, Alex wrote:
> We do have a situation now where we need rsync to transfer the files
> once only from the source directory.  Please let me briefly explain
> 
> using a simple generic exmple:
> 
> 1. At t0, we transfer f0 location A to location B
> 
> 2. At t1, 10 new files are added to Location A
> 
> Therefore, rysnc faithfully transfers all 10 new files to location B
> 
> At location B, we now have f0 to f10.
> 
> 3. At t2, f0 to f3 are deleted from location B, and we don’t ever want
> the deleted files to be copied again from location A
> 
> 4. At t3,  rysnc waits up, transfers files f0 and f10 again plus any
> new files that may have been added.
> 
> So, at location B, we end with the deleted files f0 to f3 again.
> 
> Can you please think of a way we can soft-switch rsync NOT to do step
> 4 above ?

As a stateless one-way mirroring tool, rsync doesn't support that
(unless you count --remove-source-files).  If you could provide some
more insight into your workflow, I might be able to come up with a
suitable alternative approach.

-- 
Matt



More information about the rsync mailing list