Deleting files from source after a successful rsync !

2002-02-07 Thread Kapoor, Nishikant X

I have a few clients who prepare some reports and put it in their outgoing/ directory 
for me to pick up every morning. Is there a way to delete those files from their 
outgoing/ after I fetch them ?

Thanks
Nishi





Re: Deleting files from source after a successful rsync !

2002-02-07 Thread Wayne Davison

On Thu, 7 Feb 2002, Kapoor, Nishikant X wrote:
 I have a few clients who prepare some reports and put it in their
 outgoing/ directory for me to pick up every morning. Is there a way to
 delete those files from their outgoing/ after I fetch them ?

You can use my --move-files patch for this, which also requires my
no-hang patch.  (You'd have to get them to install this updated rsync on
their end as well as on your end.)  If that is not possible, you'd have
to kludge something together that would keep track of what files got
grabbed and run a separate ssh process with a manual rm command.

If you're running 2.5.2, you can apply the most recent versions of my
patches:

http://www.clari.net/~wayne/rsync-nohang.patch
http://www.clari.net/~wayne/rsync-move-files.patch

(Use patch -p1 rsync-nohang.patch followed by same thing for the
move-files patch.)

If you're running 2.5.1, use these patch files instead:

http://www.clari.net/~wayne/rsync-2.5.1-nohang.patch
http://www.clari.net/~wayne/rsync-2.5.1-move-files.patch

If you're running an even older rsync, you should be able to hand-patch
the rejected chunks from the 2.5.1 versions.

I use an older rsync with these changes on my production systems (to
move ever-arriving information from box to box), and it works great for
me.

Future versions of rsync will hopefully have some version of the
--move-files option included, though we haven't finished the discussion
of exactly what we want to do for the official release.

..wayne..